1. 25 Feb, 2019 1 commit
    • Brandon LeBlanc's avatar
      Resolve ``ValueError`` when mapping value contains a literal ``=``. · e28fc7e8
      Brandon LeBlanc authored
      Example ``setup.cfg``::
      
          project_urls =
            Documentation = https://format-pipfile.readthedocs.io/en/latest/?badge=latest
      
      Current result::
      
          $ ./setup.py
          ERROR:root:Error parsing
          Traceback (most recent call last):
            File "/usr/local/lib/python3.7/site-packages/pbr/core.py", line 96, in pbr
              attrs = util.cfg_to_args(path, dist.script_args)
            File "/usr/local/lib/python3.7/site-packages/pbr/util.py", line 258, in cfg_to_args
              kwargs = setup_cfg_to_setup_kwargs(config, script_args)
            File "/usr/local/lib/python3.7/site-packages/pbr/util.py", line 336, in setup_cfg_to_setup_kwargs
              k, v = i.split(=)
          ValueError: too many values to unpack (expected 2)
          error in setup command: Error parsing /Users/brandon/src/format-pipfile/setup.cfg: ValueError: too many values to unpack (expected 2)
      
      After changes::
      
          $ ./setup.py egg_info
          [...]
          $ grep -i project-url *.egg-info/PKG-INFO
          [...]
          Project-URL: Documentation, https://format-pipfile.readthedocs.io/en/latest/?badge=latest
          [...]
      
      add unit tests
      
          {1} pbr.tests.test_util.TestMapFieldsParsingScenarios.test_project_url_parsing(simple_project_urls) [0.034230s] ... ok
          {1} pbr.tests.test_util.TestMapFieldsParsingScenarios.test_project_url_parsing(query_parameters) [0.029791s] ... ok
      
      Closes-Bug: #1817592
      Change-Id: Ifd4c46111528d99dadee77d6aabed201d9e84bdb
      Signed-off-by: 's avatarBrandon LeBlanc <brandon@leblanc.codes>
      e28fc7e8
  2. 22 Jan, 2019 1 commit
    • Ben Nemec's avatar
      Ignore --find-links in requirements file · bc4193b1
      Ben Nemec authored
      We already skip things like --index-url, but --find-links can also
      be present and also shouldn't be included in install_requires.
      
      This also fixes some issues with the existing unit test for this
      filtering.
      
      Change-Id: Ie8eca8c19e955d52722feaa71d5843ccd74b0da0
      Closes-Bug: 1716808
      bc4193b1
  3. 11 Jan, 2019 1 commit
    • Will Szumski's avatar
      Do not globally replace path prefix · a9b31113
      Will Szumski authored
      If a subdirectory contained the source prefix in it's name, this was
      replaced globally e.g using share/ansible = ansible/*, with the following
      directory structure:
      
        ansible/roles/kolla-ansible/test
      
      would result in the files being installed as follows:
      
        share/ansible/roles/kolla-share/test
      
      whereas we expected:
      
        share/ansible/roles/kolla-ansible/test
      
      This patch changes the behavior so that only the first occurance is
      replaced.
      
      Change-Id: I0aab845315dab0aaccd5f67725d2ebcf0fd08aef
      Fixes-Bug: 1810804
      a9b31113
  4. 26 Oct, 2018 2 commits
    • Sean McGinnis's avatar
      Fix incorrect use of flake8:noqa · 8080c62f
      Sean McGinnis authored
      Adding the comment flake8:noqa in a file will skip linting the entire
      file. Most of the time, the intent was just to skip individual lines to
      handle exception cases.
      
      This gets rid of the "flake8:" prefix where it was used incorrectly and
      fixes a few legitimate errors that were being hidden by the entire file
      being skipped.
      
      The behavior is change in flake8 to handle this better, which will
      result in pep8 job failures if these are not fixes first. See more
      information in the 3.6.0 release notes:
      
      http://flake8.pycqa.org/en/latest/release-notes/3.6.0.html#features
      
      Change-Id: I1af4eb8bef9d0d0e3aa3bbbfd66a2fcb8ab336cb
      Signed-off-by: 's avatarSean McGinnis <sean.mcginnis@gmail.com>
      8080c62f
    • Sorin Sbarnea's avatar
      Correct documentation hyperlink for environment-markers · 656aac93
      Sorin Sbarnea authored
      Previous hyperlink was redirected to root of the new documentation
      location which did not contain the right information.
      
      New link points directly to the right location.
      
      Change-Id: I3c83553a50036eadec74e7a00f3b312a7e5afa11
      656aac93
  5. 05 Oct, 2018 1 commit
    • Ian Wienand's avatar
      Special case long_description_content_type · 77e75e25
      Ian Wienand authored
      As described in the pypa pull request, special-case passing through
      these fields into the metadata.  setuptools will maintain them.
      
      Change-Id: I89eb8c6d627790680a61a0a4b7490191b6e8e90c
      Closes-Bug: #1762494
      77e75e25
  6. 04 Oct, 2018 1 commit
  7. 24 Sep, 2018 2 commits
  8. 14 Sep, 2018 1 commit
    • Dirk Mueller's avatar
      Skip test for testr hook being installed when testr is not available · a4f27ca3
      Dirk Mueller authored
      pbr only depends on testrepository in the test requirements, so
      packaging efforts can decide to skip the dependency if they want to.
      As stestr is going to replace testrepository going forward, it makes
      sense to make dependencies to testrepository optional.
      
      Skip the test that requires testrepository in that scenario.
      
      Change-Id: I28c30411a5a6fdb071ebcc35e65ce1f4f1242498
      a4f27ca3
  9. 23 Aug, 2018 1 commit
  10. 30 Jul, 2018 1 commit
  11. 23 Jul, 2018 1 commit
  12. 18 Jul, 2018 4 commits
  13. 05 Jul, 2018 1 commit
  14. 01 Jun, 2018 1 commit
  15. 31 May, 2018 1 commit
    • Matthew Treinish's avatar
      Revert "Remove win32/nt checks for wrapper script gen" · ee26945c
      Matthew Treinish authored
      This reverts commit 07de8446.
      The output console_scripts generated after this commit landed are no
      longer directly callable from windows machines. Prior to the this
      reverts we wrapped console_script entrypoints in a .exe on windows so
      you could directly execute them, just like on *nix systems. However,
      after the commit we are no longer generating callables on windows.
      Instead PBR generates a txt file, without a suffix, that is not a valid
      executable on windows. It is exactly the same output as on a *nix
      system, but this neglects that scripts with shebangs don't work on
      windows. (For example generated output on windows see [1]) The exe files
      were needed so that we could directly execute the console scripts on
      windows. This commit restores this functionality so that PBR will
      properly generate executable console_scripts on windows machines again.
      
      Closes-Bug: #1761134
      [1] http://paste.openstack.org/show/722389/
      
      Change-Id: Ifc13879b7f64650d444e3a14df1a53b2172828e4
      ee26945c
  16. 24 Apr, 2018 1 commit
    • Ian Wienand's avatar
      Fix builddoc with sphinx <= 1.6 · a562b124
      Ian Wienand authored
      I went to build infra-specs which specifies sphinx==1.5.6 and hit
      
       Traceback (most recent call last):
         File "setup.py", line 29, in <module>
           pbr=True)
         ...
        File ".../pbr/builddoc.py", line 235, in run
          self._sphinx_run()
        File ".../pbr/builddoc.py", line 162, in _sphinx_run
          freshenv=self.fresh_env, warningiserror=self.warning_is_error)
        File ".../sphinx/application.py", line 244, in __init__
          self._init_builder(self.buildername)
        File "...//sphinx/application.py", line 311, in _init_builder
          raise SphinxError('Builder name %s not registered' % buildername)
       sphinx.errors.SphinxError: Builder name h not registered
      
      It appears to be a typo introduced with
      I18bbf693bca2f6e49d822ae2940d2170a2b90ce9; make sure we're walking the
      self.builders list; not the string self.builder.
      
      Change-Id: Ic038029c361b3ede48f2b495c74430d3ad1eab82
      a562b124
  17. 27 Mar, 2018 1 commit
    • Ben Nemec's avatar
      Explicitly read setup.cfg as utf-8 on Python 3 · 10fce39a
      Ben Nemec authored
      Per the referenced bug, relying on the terminal encoding to read
      setup.cfg is not safe.  Unfortunately, Python 2 doesn't accept an
      encoding when reading config files so we need a fallback path for
      that version.
      
      Change-Id: If49344db2f9139c0557f6acd17671163e02468a5
      Closes-Bug: 1745396
      10fce39a
  18. 26 Mar, 2018 2 commits
    • Stephen Finucane's avatar
      builddoc: Treat '[pbr] autodoc_tree_excludes' as a multi-line opt · 1fe0ceab
      Stephen Finucane authored
      We were treating this a single line, comma- or space-delimited option.
      This was incorrect and was causing issues for projects like neutron-lib
      when Sphinx 1.7, which switches from optparse to the stricter argparse
      was used. In addition, this project was including comments in the
      multi-line opt. These were being passed through but Sphinx < 1.7 was
      simply ignoring them. These are now filtered out.
      
      Change-Id: I177edf0f44714175da220cf3a960b8f23aa4ab09
      Closes-Bug: #1753082
      1fe0ceab
    • Doug Hellmann's avatar
      update parse test to use reliable comparison · 37a1ce7f
      Doug Hellmann authored
      Different versions of setuptools seem to produce
      different representations of the version specifiers,
      so use pkg_resources to parse the values again
      and then compare the resulting objects so we
      aren't tripped up by rendering differences.
      
      Change-Id: Ic67cc936208dbd96b6d811c6aa284fd87df5b118
      Signed-off-by: 's avatarDoug Hellmann <doug@doughellmann.com>
      Closes-Bug: #1758877
      37a1ce7f
  19. 20 Mar, 2018 1 commit
    • Clark Boylan's avatar
      Better Sem-Ver header handling · 183b445c
      Clark Boylan authored
      This makes Sem-Ver header handling more reliable by ignoring any
      potential user configured git log output format. Instead PBR supplies
      its own format string that will output the commit message bodies in
      their entirety without wrapping and other whitespace formatting done for
      humans.
      
      Change-Id: I957a8c182585119534b4e02c34e7140a3e07d1d6
      Related-Bug: 1738685
      Fixes-Bug: 1704625
      183b445c
  20. 17 Jan, 2018 2 commits
  21. 09 Jan, 2018 1 commit
  22. 05 Jan, 2018 1 commit
  23. 03 Jan, 2018 1 commit
    • Stephen Finucane's avatar
      Deprecate testr and nose integration · 113685e1
      Stephen Finucane authored
      These are not recommended for use in OpenStack anymore and both nose and
      testr offer native setuptools commands that can be manually aliased to
      'test' on a per-project basis if necessary. Deprecate with an eye to
      removal in the future.
      
      Change-Id: I753f2ffe8b223b180b8ed813d879b3a28b47a1ab
      Signed-off-by: 's avatarStephen Finucane <sfinucan@redhat.com>
      113685e1
  24. 06 Dec, 2017 3 commits
    • Stephen Finucane's avatar
      tests: Increase coverage of requirements parsing · 6c8455c8
      Stephen Finucane authored
      This is mostly an exercise in refactoring, moving tests into a single
      test case. An additional test is added, however, verifying that default
      requirement files are indeed used if nothing else is provided.
      
      Change-Id: I8dc6cc8c50f1280f24731480501fab61fc401809
      6c8455c8
    • Stephen Finucane's avatar
      trivial: Move packaging tests to test_packaging · ec210af0
      Stephen Finucane authored
      There's a little bit of duplication going on here. Resolve this by
      moving tests that predominantly focus on FILE to tests/test_FILE.
      
      Change-Id: I29355155853e543d017db00c936bcdc88c1c97ad
      ec210af0
    • Monty Taylor's avatar
      Put test-requirements into an extra named 'test' · 225e8823
      Monty Taylor authored
      In bindep files we use a 'test' environment to indicate dependencies
      that are needed for testing. Make the same thing available for our
      python dependencies, allowing things like "pip install .[test]" or "pip
      install shade[test]" to work.
      
      Change-Id: If3ad8b6a79a8cab2f7434b73207f35384e8516ba
      225e8823
  25. 04 Dec, 2017 1 commit
    • Jeremy Stanley's avatar
      Support Description-Content-Type metadata · 538d2c21
      Jeremy Stanley authored
      As of setuptools 36.4.0, support for Description-Content-Type
      metadata was added via the long_description_content_type variable.
      Add a metadata.description-content-type option for setup.cfg so it
      can be provided through PBR. This makes it possible to instruct PyPI
      and potentially other frontends to know an explicit RFC 1341 content
      type, along with character set and variant, for the accompanying
      long description.
      
      Change-Id: I852f603d9ca4e4cd469eab4cae9933ef2581e3af
      538d2c21
  26. 22 Nov, 2017 1 commit
  27. 18 Oct, 2017 1 commit
    • Stephen Finucane's avatar
      Use 'build_reno' setuptools extension if available · 3a6b96c7
      Stephen Finucane authored
      reno recently gained a 'build_reno' command that could be used to build
      a reno cache file via setuptools. Integrate this and start including
      that file as part of the final distribution.
      
      Change-Id: I54cb7a894770040165cc918469cb0ed486518789
      3a6b96c7
  28. 12 Oct, 2017 2 commits
  29. 09 Oct, 2017 1 commit
    • Stephen Finucane's avatar
      Remove support for command hooks · 32c90ba5
      Stephen Finucane authored
      distutils2 is long dead and many of its best ideas have been
      incorporated into setuptools. One of the ideas that *has not* been
      incorporated is the idea of command hooks, of either the pre or post
      kind. pbr is still carrying the code for this, and there are several
      issues with this:
      
      - No one is using this functionality in OpenStack and, given the
        complete lack of documentation on the matter, it's very doubtful that
        it's being used anywhere else [1]
      - It's causing issues for projects attempting to hook into the
        'distutils.commands' entry point on Python 2.7, which it seems no else
        must have attempted yet [2].
      - distutils2 is dead and advanced features like this that we don't
        explicitly need should not be retained
      
      We could attempt to fix this but why bother? Good riddance, I say.
      
      [1] http://codesearch.openstack.org/?q=pre_hook%5C.&i=nope&files=&repos=
      [2] http://codesearch.openstack.org/?q=distutils.commands&i=nope&files=&repos=
      
      Change-Id: I01f657034cffbf55ce830b7e8dbb6b3d94c1fd18
      32c90ba5
  30. 06 Oct, 2017 1 commit