Commit Graph

1141 Commits

Author SHA1 Message Date
Zuul f3b9a8919f Merge "Fix parsing on egg names with dashes from git URLs" 2019-07-18 11:16:30 +00:00
Corey Bryant e4b89ae2cb Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Ie9765e198e1204f56976476c8cfc9cc008c23d8f
Story: #2005924
Task: #34234
2019-07-17 10:03:07 -04:00
Zuul aff2fd2d1d Merge "Resolve some issue with tox.ini, setup.cfg" 2019-07-15 16:00:09 +00:00
Hervé Beraud 4627305b8a Fix parsing on egg names with dashes from git URLs
repository urls for non editables end up in the `install_requires`
list causing setup to fail. In this commit, all usable external urls get
inserted into the `dependency_links` list with the corresponding egg fragments
parsed into package names and versions (maintaining dashes if any) and added to
`install_requires` list.

Introduce parsing by using urlparse to extract properly the url
fragment.

Change-Id: If19576869fdf38e1768190c2d9c33f32504f7c54
Closes-Bug: #1373623
2019-06-26 16:55:13 +02: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
Zuul e4c7dba0bd Merge "Fix Windows support" 2019-06-17 18:19:29 +00:00
Zuul 884899b432 Merge "Install more dependencies for integration testing" 2019-06-17 18:10:32 +00:00
Stephen Finucane 79ef8d989a Resolve some issue with tox.ini, setup.cfg
- Use constraints for documentation targets
- Indicate support for Python 3.6, 3.7
- Fix indentation

Change-Id: I486b6f645fa71f0fa519464465bf26411ca4faf4
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-06-13 15:46:30 +01:00
Zuul 17f9439e9f Merge "Read description file as utf-8" 2019-06-10 22:55:38 +00:00
Zuul e5c6099e1d Merge "Allow git-tags to be SemVer compliant" 2019-06-10 20:55:40 +00:00
Ben Nemec 96b84a9014 Stop using pbr sphinx integration
Switch to sphinx-build directly and add sphinxcontrib-apidoc for
generated api docs.

Change-Id: I089a7695986892dcb47c5b5e79a6a227891a2347
2019-06-07 18:37:58 +01:00
Ben Nemec e8e9da3d90 Switch to release.o.o for constraints
This is the preferred location to get constraints now.

Change-Id: I5dc34e63f94ebf9c19ffb5caeeea24581eca658f
2019-06-07 16:17:10 +00:00
Ben Nemec ab3db59c5a Make WSGI tests listen on localhost
Currently we rely on the wsgi server to choose its own bind address,
which tends to result in it listening on a DNS name. This means we
have a dependency on that name resolving as expected on the node,
which seems to not always be the case.

In the interest of removing that environment dependency, let's have
the wsgi tests explicitly listen on 127.0.0.1, which should always
work and still allows us to verify our part of the WSGI functionality.

This also includes a fix to use constraints for building docs because
that is also blocking ci on this repo. We need both of these changes
for anything to merge without endless rechecks.

Change-Id: I48438eb31ee9dd102f06e30b13c6d892a93aba3b
Closes-Bug: 1830962
2019-06-07 16:17:10 +00:00
Lucian Petrut a7e5c0202e Fix Windows support
A recent commit [1] broke Windows support by using shlex to
unquote paths.

The issue with shlex.split is that it doesn't work with Windows
paths, treating backslashes as escape characters.

We'll just replace backslashes with slashes before using shlex.split,
converting them back afterwards.

Closes-Bug: #1831242

[1] Id2cc32e4e40c1f834b19756e922118d8526358d3

Change-Id: Icb3abca004a35ab9760db8116fedfa96d012d0d0
2019-05-31 15:35:45 +03:00
Martin Domke de739bb080 Allow git-tags to be SemVer compliant
This fix allows it to use git-tags with a pre-release suffix that
follows the SemVer specification (e.g. 1.2.3-rc1).

Change-Id: Ie2e3c0e4145a105aff0a35c8dc6ec2a0cc1fc04e
2019-05-24 13:22:45 +00:00
Ben Nemec 3b102a551b Read description file as utf-8
Currently pbr fails if the description file contains unicode
characters.  To fix this we need to open the description file as
utf-8 explicitly.  Since open() in Python 2 doesn't support an
encoding parameter, use io.open() which works on both 2 and 3.

Co-Authored-By: Hervé Beraud<hberaud@redhat.com>

Change-Id: I1bee502ac84b474cc9db5523d2437a8c0a861c00
Closes-Bug: 1704472
2019-05-24 10:59:17 +02:00
Zuul c1e4225c5a Merge "Remove neutron-lbaas" 2019-05-24 08:21:29 +00:00
Zuul e00bf5b18e Merge "Set subparser argument required" 2019-05-23 17:02:50 +00:00
Zuul e38c222ce1 Merge "Fix white space handling in file names" 2019-05-23 16:56:42 +00:00
Corey Bryant 20d95468bc Add openstack-tox-py37 job
Enables py37 testing while also being more friendly with developer
environments where not all python versions may be available.

Runs the docs jobs last as that one is the least likely to be needed.

Tox min version is needed for the new options used inside.

Change-Id: Icc6cb4979b2523a0edfc6375c5c032bb8be76b9f
Story: #2004073
Task: #27440
2019-05-23 10:42:30 +00:00
Hervé Beraud 713aff286b Set subparser argument required
When subparser argument is not provided by user
argparse return an error message not really useful for user:

    'Namespace' object has no attribute 'func'

This is due to the fact that when we launch the pbr in cli mode
the subparser argument is not mandatory (required) and directly
we try to execute a undefined function.

Set the subparser required is more helpful for users due to the
fact that argparse display the helping message with the available
sub-commands that users can use

These changes provides the following output if the argument is not
passed:

usage: pbr [-h] [-v] {sha,info,freeze} ...
main.py: error: too few arguments

Change-Id: I7982f9d40cb0979ddb89d7bc53964167f8e4b269
2019-05-23 10:42:08 +00:00
Andreas Jaeger 4428e34dc0 Remove neutron-lbaas
neutron-lbaas is getting retired, see [1]. Therefore remove use of it
from this repo.

[1]
http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006142.html

Change-Id: Icbff2f69cfea78e961a60ae7723ed7dc58f296a7
2019-05-23 09:15:38 +00:00
Ben Nemec c691c63d83 Install more dependencies for integration testing
When running this locally I needed to install a few more distro
packages to provide build dependencies for pip packages. This change
adds them to the list of things installed in tools/integration.sh.

Change-Id: I2ae04b893c7dfddcb6d94b724f53ee08436bf577
2019-05-21 16:18:43 +00:00
Hervé Beraud 30926f6dbe Update Sphinx requirement
Sphinx 2.0 no longer works on python 2.7, so we need to start capping it
there.

Change-Id: Ia13b8a75f11ee997e00e817464829ce8b86d2e16
2019-05-16 15:33:37 +02: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
OpenDev Sysadmins 55429ef856 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:36:17 +00:00
Ben Nemec fba29ab4f1 Typo fix: s/extract_mesages/extract_messages/
Change-Id: If4141dd8e8876fc3d9d3e7579177a44f7c7da563
2019-03-25 16:39:59 +00:00
Ben Nemec 7f9d653c29 Support provides_extra metadata
This was added to setuptools in [1] so we should support passing it
through from pbr.

Change-Id: I46493c18756bcb01c53575ab51ec5e5e97670fc3
1: b2ea3c4a20
Closes-Bug: 1760938
2019-03-25 16:39:59 +00:00
Ian Wienand 08b42cae51 Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: I1d81f12d728b628f5f6efc0ffb812246c0c2fef8
2019-03-24 20:35:35 +00:00
Zuul fd045e6e40 Merge "Fix nits and typos on release note message." 2019-03-21 15:55:37 +00:00
Zuul 8aee440b97 Merge "Fix error when keywords are defined as a list in cfg" 2019-03-20 21:37:54 +00: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
Ben Nemec b30335f516 Remove libzmq-dev from integration.sh package install
It appears this no longer exists on bionic, and we shouldn't need it
for pbr tests. I suspect this may have been some copy-pasta from
another project's integration tests.

Change-Id: Ife631f77a92ee0b34c19e77cad782d94d18f2e74
Closes-Bug: 1820855
2019-03-19 14:10:15 +00:00
Zuul 2062a56ccf Merge "Change openstack-dev to openstack-discuss" 2019-03-13 17:51:15 +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
melissaml f3811cb72b Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: Ifc72c767e76283df4608da8d7097ef86c367a5cf
2019-02-15 16:05:59 +00: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
qingszhao 11cf070f94 Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: I18a5f9696659bce3c03018b636968d5c3c96dc73
2018-12-04 13:18:43 +00:00
Zuul 6a88aadaa8 Merge "Correct documentation hyperlink for environment-markers" 2018-10-30 00:24:34 +00:00
Sean McGinnis 8080c62f81 Fix incorrect use of flake8:noqa
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: Sean McGinnis <sean.mcginnis@gmail.com>
2018-10-26 13:43:14 -05:00
Sorin Sbarnea 656aac93c9 Correct documentation hyperlink for environment-markers
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
2018-10-26 15:16:55 +00:00
Zuul bd300d07ee Merge "Add an option to skip generating RELEASENOTES.rst" 2018-10-16 16:08:13 +00:00
Zuul 73a763d1e3 Merge "Skip test for testr hook being installed when testr is not available" 2018-10-15 18:04:08 +00:00
Zuul 4788f49ec0 Merge "tox: Suppress output" 2018-10-15 18:04:07 +00:00
Zuul 32bfe7808f Merge "packaging: Remove support for pyN requirement files" 2018-10-06 21:14:59 +00:00
Zuul 36da1a13c0 Merge "docs: Add docs for reno integration" 2018-10-06 18:34:58 +00:00