Commit Graph

24 Commits

Author SHA1 Message Date
Clark Boylan 0e335e6ddb Add release note for build_sphinx removal
This wasn't done in the change that removed the feature but seems like a
good idea.

Change-Id: I97bdda4ce89b26c6e99de6f1d6ad7d734cac9041
2023-06-01 08:24:37 -07:00
Chris Dohmen 0aecbea81b Fix symbol identification in multiline message
* Fix an issue where a multiline message with leading spaces would cause
  invalid symbol identification.
* Add unit-tests around multiple symbols in a single line

Sem-Ver: bugfix
Change-Id: Id799c2fd368d9df38a5c01fc2071283aecef67c6
2022-08-05 10:08:09 -04:00
Jeremy Stanley 407d921751 Add release note about missing pbr.json fix
Include a release note for I407ae88ab8de4b61f94034b3d79a2ca7f7d79d16
which corrected a regression for missing pbr.json metadata files in
packages.

Change-Id: I3f0e48c215e890f9b26bae6600d5fcacf67831c6
2022-02-05 16:06:59 +00:00
Monty Taylor 09ee153410 Add a PEP517 interface
pep517 defines a new module method of specifying build backends.
To allow pbr to exist in this world, we should define the interface
that's needed. For this to be used, one will put:

  [build-system]
  requires = ["pbr>=5.7.0", "setuptools>=36.6.0", "wheel"]
  build-backend = "pbr.build"

Into pyproject.toml - and the pep517 interface will be used.

This doesn't really change anything else - it just makes us support this.
So by itself this commit isn't SUPER helpful. But maybe let's take baby
steps with something this prone to strife, yeah?

After this we can start teasing some things apart and doing our
own things directly.

Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
Change-Id: I293f59b5074a38c78adffe580de2f1533bb01ce7
2021-11-03 10:05:32 -07:00
Jeremy Stanley 242f7bd1b6 Remove use_2to3 backward compat for Setuptools
Odds are this was never used by any PBR-based projects, but was
included from the beginning to support a feature of Setuptools for a
utility which has been long since discouraged. As of Setuptools
46.2.0 and Python 3.9 it's generating deprecation warnings, and is
slated for removal from the Python 3.10 standard library.

https://bugs.python.org/issue40360
https://github.com/pypa/setuptools/issues/2086

Change-Id: I6972984f29413d2534d802b142fa9323a7e4a4a3
2020-09-19 14:07:01 +00:00
Jeremy Stanley e52e608e35 Remove bdist_wininst support
Odds are this was never used, but as of Python 3.8 and Setuptools
47.2 it's deprecated in favor of just using wheels for Windows
platform packaging anyway.

https://discuss.python.org/t/deprecate-bdist-wininst/
https://discuss.python.org/t/remove-distutils-bdist-wininst-command/

Change-Id: I3840d9fccb1f87be5c2c03470e156559c01b7cd6
2020-08-27 17:01:31 +00:00
Andreas Jaeger 2242cb652e Support newer openstackdocstheme
openstackdocstheme 2.2.0 introduces new variables, add them here so that
both older and newer openstackdocstheme versions are supported.
2.2.0 suport the old settings but in the future those might get removed,
so let's be future-proof.

Since this repo is still supporting py27, we need support for older
openstackdocstheme versions.

Change-Id: I6ee389843d1d959cffb126e0cd56ef6ef1e2f5e1
2020-08-06 08:33:50 +00:00
Gaetan Semet c715db6df9 option to print only the version of a package
Example:
    $ pbr info -s pkgname
    1.2.3

Change-Id: Ic66848dbe44ed946800979fb73776ab6d00869f6
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
2019-06-24 09:58:26 +00:00
Will Szumski 50356da839 Fix white space handling in file names
Previously, when using data_files with a glob that matched a file with
whitespace in the name, pip would error with a message that the file
does not exist, e.g:

    error: can't copy 'ansible/roles/yatesr.timezone/templates/timezone-Arch': doesn't exist or not a regular file

The problem was that ansible/roles/yatesr.timezone/templates/timezone-Arch
was a truncated form of the actual filename:

    ansible/roles/yatesr.timezone/templates/timezone-Arch Linux.j2

Note the space in the filename and that it has been split on this space.

This change allows you to use a glob that matches files with whitespace
in the name. It does this by quoting the path.

Change-Id: Id2cc32e4e40c1f834b19756e922118d8526358d3
Fixes-Bug: 1810934
2019-04-25 11:25:56 +01:00
Hervé Beraud 6fe7f659de Fix nits and typos on release note message.
Fixing some nits and typos.

Change-Id: Ia6c2dbcd99d88bf23e5e8fda7ba9321c7f6cc3aa
2019-03-20 17:19:38 +00:00
Hervé Beraud 2e3aa0d851 Fix error when keywords are defined as a list in cfg
When keywords are defined as a list in cfg file the generated
output have errors and breaks metadata generation.

Change-Id: Ie8a5f30d6af1e81ecf3ca40bc94bc460cca38179
Closes-Bug: #1811475
2019-03-04 18:44:35 +01:00
Zuul 02dfb82e91 Merge "Resolve ``ValueError`` when mapping value contains a literal ``=``." 2019-02-25 22:43:37 +00:00
Brandon LeBlanc e28fc7e870 Resolve ``ValueError`` when mapping value contains a literal ``=``.
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: Brandon LeBlanc <brandon@leblanc.codes>
2019-02-25 17:09:55 +01:00
Zuul 7909c7afd3 Merge "Ignore --find-links in requirements file" 2019-01-22 21:04:45 +00:00
Ben Nemec bc4193b183 Ignore --find-links in requirements file
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
2019-01-22 17:19:24 +00:00
Will Szumski a9b31113b7 Do not globally replace path prefix
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
2019-01-11 13:56:52 +00:00
Ian Wienand 77e75e25e3 Special case long_description_content_type
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
2018-10-05 13:24:49 +00:00
Stephen Finucane d01abc82d0 Add release note for fix to bug 1786306
This should make the feature more prominent.

Change-Id: I49fa0c076837dc142a3374263925116776bb7ca2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-08-27 17:51:16 +00:00
Stephen Finucane 9be181e8e6 deprecations: Deprecate support for '-py{N}' requirements
This has been marked as deprecated for a long time in the docs but
we've done nothing to indicate this from a code perspective. Fix this.

Change-Id: I916bf16773a2a2cffa3c352d5dba52e3fbc298c2
Fixes-Bug: #431529
2018-01-09 14:31:01 +00:00
Gaetan Semet 4c775e7890 Support v<semver> version
Allow protect tag (in gitlab, github) using "v*" regex.

Change-Id: I3e6eb1031ae92349c5a9531b143b6470482664e7
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
2018-01-05 14:19:47 +00:00
Stephen Finucane 113685e1b9 Deprecate testr and nose integration
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: Stephen Finucane <sfinucan@redhat.com>
2018-01-03 15:10:14 +00:00
Andreas Jaeger f49450df8e Remove setting of version/release from releasenotes
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.

Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.

This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.

Change-Id: I10847bca5bb081466807355c88a105f4e4c6564e
2017-11-16 18:54:23 +01:00
Stephen Finucane f450cd26a2 Add reno for release notes management
Change-Id: I36b8193b22123a409b729c7b9f4309507379f1ad
2017-10-10 09:36:59 +01:00
Stephen Finucane 32c90ba598 Remove support for command hooks
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
2017-10-09 10:48:33 +01:00