Imported Upstream version 5.1.1 upstream/5.1.1
authorJinWang An <jinwang.an@samsung.com>
Mon, 28 Dec 2020 04:46:37 +0000 (13:46 +0900)
committerJinWang An <jinwang.an@samsung.com>
Mon, 28 Dec 2020 04:46:37 +0000 (13:46 +0900)
AUTHORS
ChangeLog
PKG-INFO
pbr.egg-info/PKG-INFO
pbr/core.py
pbr/util.py

diff --git a/AUTHORS b/AUTHORS
index 8d53f4677180641a414d02d767278b0ae17eaa72..f88695f4629d0d9802864f4815d91b25e8aa67f2 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -104,7 +104,9 @@ Sachi King <nakato@nakato.io>
 Sascha Peilicke <speilicke@suse.com>
 Sean Dague <sdague@linux.vnet.ibm.com>
 Sean Dague <sean@dague.net>
+Sean McGinnis <sean.mcginnis@gmail.com>
 Sergey Lukjanov <slukjanov@mirantis.com>
+Sorin Sbarnea <ssbarnea@redhat.com>
 Stephen Finucane <sfinucan@redhat.com>
 Stephen Finucane <stephen.finucane@intel.com>
 Steve Kowalik <steven@wedontsleep.org>
index a4ef7ee6e000d0de56dd2102c0351e0d1913d2f6..ecfe49bf266672c6be40e330518ab7de42d856b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 CHANGES
 =======
 
+5.1.1
+-----
+
+* Fix incorrect use of flake8:noqa
+* Correct documentation hyperlink for environment-markers
+
 5.1.0
 -----
 
index 8ef2d9a4ed9703a088f6a0a0f71b51919283b3a2..4c12c9a7aad302b089a53d8d5b807b2a61dbc66c 100644 (file)
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,14 +1,14 @@
 Metadata-Version: 2.1
 Name: pbr
-Version: 5.1.0
+Version: 5.1.1
 Summary: Python Build Reasonableness
 Home-page: https://docs.openstack.org/pbr/latest/
 Author: OpenStack
 Author-email: openstack-dev@lists.openstack.org
 License: UNKNOWN
-Project-URL: Documentation, https://docs.openstack.org/pbr/
-Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/
 Project-URL: Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/
+Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/
+Project-URL: Documentation, https://docs.openstack.org/pbr/
 Description: Introduction
         ============
         
index 8ef2d9a4ed9703a088f6a0a0f71b51919283b3a2..4c12c9a7aad302b089a53d8d5b807b2a61dbc66c 100644 (file)
@@ -1,14 +1,14 @@
 Metadata-Version: 2.1
 Name: pbr
-Version: 5.1.0
+Version: 5.1.1
 Summary: Python Build Reasonableness
 Home-page: https://docs.openstack.org/pbr/latest/
 Author: OpenStack
 Author-email: openstack-dev@lists.openstack.org
 License: UNKNOWN
-Project-URL: Documentation, https://docs.openstack.org/pbr/
-Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/
 Project-URL: Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/
+Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/
+Project-URL: Documentation, https://docs.openstack.org/pbr/
 Description: Introduction
         ============
         
index 0760ab92fdbb77635233a8654be194b14730c533..645a2ef1a28e4a97046bed30e0cb9cdfae77a3bf 100644 (file)
 # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 # DAMAGE.
 
-from distutils import core
-from distutils import errors
 import logging
 import os
 import sys
 import warnings
 
+from distutils import errors
+
 from pbr import util
 
 
@@ -57,8 +57,8 @@ if sys.version_info[0] == 3:
     string_type = str
     integer_types = (int,)
 else:
-    string_type = basestring  # flake8: noqa
-    integer_types = (int, long)  # flake8: noqa
+    string_type = basestring  # noqa
+    integer_types = (int, long)  # noqa
 
 
 def pbr(dist, attr, value):
@@ -103,7 +103,6 @@ def pbr(dist, attr, value):
         raise errors.DistutilsSetupError(
             'Error parsing %s: %s: %s' % (path, e.__class__.__name__, e))
 
-
     # There are some metadata fields that are only supported by
     # setuptools and not distutils, and hence are not in
     # dist.metadata.  We are OK to write these in.  For gory details
index 45a3aeddb6d9b1f154cf4a3c8e392b88b8fc00d8..63e913d966ad57752ae0068ce094c645ecdde15a 100644 (file)
@@ -56,24 +56,21 @@ to be an installation dependency for our packages yet--it is still too unstable
 # irritating Python bug that can crop up when using ./setup.py test.
 # See: http://www.eby-sarna.com/pipermail/peak/2010-May/003355.html
 try:
-    import multiprocessing  # flake8: noqa
+    import multiprocessing  # noqa
 except ImportError:
     pass
-import logging  # flake8: noqa
+import logging  # noqa
 
+from collections import defaultdict
 import os
 import re
 import sys
 import traceback
 
-from collections import defaultdict
-
 import distutils.ccompiler
-import pkg_resources
-
-from distutils import log
 from distutils import errors
-from setuptools.command.egg_info import manifest_maker
+from distutils import log
+import pkg_resources
 from setuptools import dist as st_dist
 from setuptools import extension
 
@@ -244,11 +241,11 @@ def cfg_to_args(path='setup.cfg', script_args=()):
                 if hook != 'pbr.hooks.setup_hook']
             for hook in setup_hooks:
                 hook_fn = resolve_name(hook)
-                try :
+                try:
                     hook_fn(config)
                 except SystemExit:
                     log.error('setup hook %s terminated the installation')
-                except:
+                except Exception:
                     e = sys.exc_info()[1]
                     log.error('setup hook %s raised exception: %s\n' %
                               (hook, e))
@@ -288,7 +285,9 @@ def cfg_to_args(path='setup.cfg', script_args=()):
 
 
 def setup_cfg_to_setup_kwargs(config, script_args=()):
-    """Processes the setup.cfg options and converts them to arguments accepted
+    """Convert config options to kwargs.
+
+    Processes the setup.cfg options and converts them to arguments accepted
     by setuptools' setup() function.
     """
 
@@ -354,12 +353,13 @@ def setup_cfg_to_setup_kwargs(config, script_args=()):
                 # Split install_requires into package,env_marker tuples
                 # These will be re-assembled later
                 install_requires = []
-                requirement_pattern = '(?P<package>[^;]*);?(?P<env_marker>[^#]*?)(?:\s*#.*)?$'
+                requirement_pattern = (
+                    r'(?P<package>[^;]*);?(?P<env_marker>[^#]*?)(?:\s*#.*)?$')
                 for requirement in in_cfg_value:
                     m = re.match(requirement_pattern, requirement)
                     requirement_package = m.group('package').strip()
                     env_marker = m.group('env_marker').strip()
-                    install_requires.append((requirement_package,env_marker))
+                    install_requires.append((requirement_package, env_marker))
                 all_requirements[''] = install_requires
             elif arg == 'package_dir':
                 in_cfg_value = {'': in_cfg_value}
@@ -414,7 +414,8 @@ def setup_cfg_to_setup_kwargs(config, script_args=()):
     # -> {'fred': ['bar'], 'fred:marker':['foo']}
 
     if 'extras' in config:
-        requirement_pattern = '(?P<package>[^:]*):?(?P<env_marker>[^#]*?)(?:\s*#.*)?$'
+        requirement_pattern = (
+            r'(?P<package>[^:]*):?(?P<env_marker>[^#]*?)(?:\s*#.*)?$')
         extras = config['extras']
         # Add contents of test-requirements, if any, into an extra named
         # 'test' if one does not already exist.
@@ -430,7 +431,7 @@ def setup_cfg_to_setup_kwargs(config, script_args=()):
                 m = re.match(requirement_pattern, requirement)
                 extras_value = m.group('package').strip()
                 env_marker = m.group('env_marker')
-                extra_requirements.append((extras_value,env_marker))
+                extra_requirements.append((extras_value, env_marker))
             all_requirements[extra] = extra_requirements
 
     # Transform the full list of requirements into:
@@ -459,7 +460,7 @@ def setup_cfg_to_setup_kwargs(config, script_args=()):
                             "Marker evaluation failed, see the following "
                             "error.  For more information see: "
                             "http://docs.openstack.org/"
-                            "developer/pbr/compatibility.html#evaluate-marker"
+                            "pbr/latest/user/using.html#environment-markers"
                         )
                         raise
             else:
@@ -473,9 +474,10 @@ def setup_cfg_to_setup_kwargs(config, script_args=()):
 
 
 def register_custom_compilers(config):
-    """Handle custom compilers; this has no real equivalent in distutils, where
-    additional compilers could only be added programmatically, so we have to
-    hack it in somehow.
+    """Handle custom compilers.
+
+    This has no real equivalent in distutils, where additional compilers could
+    only be added programmatically, so we have to hack it in somehow.
     """
 
     compilers = has_get_option(config, 'global', 'compilers')
@@ -497,7 +499,7 @@ def register_custom_compilers(config):
 
             module_name = compiler.__module__
             # Note; this *will* override built in compilers with the same name
-            # TODO: Maybe display a warning about this?
+            # TODO(embray): Maybe display a warning about this?
             cc = distutils.ccompiler.compiler_class
             cc[name] = (module_name, compiler.__name__, desc)
 
@@ -560,13 +562,14 @@ def get_extension_modules(config):
 
 
 def get_entry_points(config):
-    """Process the [entry_points] section of setup.cfg to handle setuptools
-    entry points.  This is, of course, not a standard feature of
-    distutils2/packaging, but as there is not currently a standard alternative
-    in packaging, we provide support for them.
+    """Process the [entry_points] section of setup.cfg.
+
+    Processes setup.cfg to handle setuptools entry points. This is, of course,
+    not a standard feature of distutils2/packaging, but as there is not
+    currently a standard alternative in packaging, we provide support for them.
     """
 
-    if not 'entry_points' in config:
+    if 'entry_points' not in config:
         return {}
 
     return dict((option, split_multiline(value))
@@ -600,9 +603,7 @@ def split_csv(value):
 
 # The following classes are used to hack Distribution.command_options a bit
 class DefaultGetDict(defaultdict):
-    """Like defaultdict, but the get() method also sets and returns the default
-    value.
-    """
+    """Like defaultdict, but get() also sets and returns the default value."""
 
     def get(self, key, default=None):
         if default is None: