Commit Graph

1064 Commits

Author SHA1 Message Date
Stephen Finucane 6f5c1ee8e4 Deprecate 'test' integration
No one in OpenStack should be using this command any more and it's
unlikely that anyone outside it is even using these. We don't want to
have to continue supporting this going forward so let's start the
deprecation process.

Change-Id: I51e8ebb0268ff7ec1e71d66ff59422fcc7377c4c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-07-18 15:26:52 +01:00
Stephen Finucane ecbda3076e Deprecate 'build_sphinx' integration
We now have a path away from this feature, so let's deprecate it while
we can.

Change-Id: Idfc34b9085c6da9b8cac24986be5f3bad142d927
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-07-18 15:23:44 +01:00
Stephen Finucane 75bac5d50b Add Sphinx extension
This duplicates what already exists in openstackdocstheme but provides a
migration path for users outside of the OpenStack ecosystem.

Change-Id: I73750b3fe984f9d2f339aac0f435a83ee68c89da
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-07-18 15:22:16 +01:00
Stephen Finucane 553b73a7a7 doc: Add documentation for missing '[pbr]' options
There are more that just autodoc options in here. Some formatting issues
are also corrected.

Change-Id: I075281d97c2fc7981a38ff1ddbb4ec76717ac726
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-07-18 15:13:41 +01:00
Stephen Finucane 9605bf7a74 doc: Fix formatting of packagers guide
We're going to be making some changes to this shortly.

Change-Id: I07e8421dd8b6598da75348e3d8d3baae3ae457ff
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-07-18 15:13:41 +01:00
Stephen Finucane 2222dbb47e Switch to stestr
According to Openstack summit session [1], stestr is maintained project
to which all Openstack projects should migrate. Let's switch to stestr
as other projects have already moved to it.

While we're at it, we also fix the docs requirements and removed the
unused 'pypy' and 'cover' tox targets.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I424068adc9092be2cf40d117c9dc4e92bb51e804
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-07-18 10:12:17 +01:00
Stephen Finucane 915e62ef7b trivial: Fix file permissions
No reason for these to be executable.

Change-Id: I9b22f4b9e679a5f618bb3f2a007327bdb0c80305
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-07-18 10:12:17 +01:00
Stephen Finucane 8b727ce929 trivial: Remove 'tools/releasenotes_tox.sh'
This is not needed since reno 2.1.0 (commit f8fc8f97) [1].

[1] https://github.com/openstack/reno/commit/f8fc8f97

Change-Id: I335bba8c8bf4f2d73aba32ae762607e67ee3814c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-07-18 10:12:04 +01:00
Stephen Finucane 3dc5ae566b Add docstring from LocalManifestMaker.add_defaults
A not-so-recent change to setuptools [1] has resulted in the inclusion
of a docstring from distutils that uses broken rST.

  docstring of pbr.packaging.LocalManifestMaker.add_defaults:11:Definition
  list ends without a blank line; unexpected unindent.

Resolve the issue by simply redefining the docstring.

[1] 252ee6f...f1cf491f
[2] https://github.com/python/cpython/blob/3.4/Lib/distutils/command/sdist.py#L217-L229

Change-Id: I84b5097bc31af601061a77dfea9d6a6f38b018cc
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-07-05 15:30:35 +01:00
Zuul 73234c84b5 Merge "Support python-requires metadata" 2018-06-27 03:23:28 +00:00
qingszhao 6c546bc9ab Update python3 versions in tox.ini envlist
This updates the envlist to include modern versions of python. It
doesn't really mean anything except for you run tox without specifying
an environment it will now run py35 and py36 instead of py34 (which
isn't used anywhere anymore)

Change-Id: I935cf6d104fa5b516332cbb587d327dc587d0c32
2018-06-12 16:43:55 +08:00
qingszhao 0ddb7ec6dc fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I70b4fb58c7800158907d80f83018e39d1b785668
2018-06-12 01:47:42 +08:00
Zuul cc27116b54 Merge "Add leading 0 on alpha release in semver doc" 2018-06-08 11:37:49 +00:00
Ben Nemec 74680aa5f1 Support python-requires metadata
Expose the python_require setuptools option via the python-requires
metadata item in setup.cfg.

Closes-Bug: 1735668

Change-Id: Idf2bb90882121e118f5b7531e027d350c0e4a441
Co-authored-by: Dennis Verspuij <dennisverspuij@users.noreply.github.com>
2018-06-01 18:02:55 +00:00
Matthew Treinish ee26945cb3
Revert "Remove win32/nt checks for wrapper script gen"
This reverts commit 07de844615.
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
2018-05-31 11:05:34 -04:00
Gaetan Semet 46c56c972b Add leading 0 on alpha release in semver doc
Change-Id: I3c13be99237ff8840f36e21cae684d346defc03d
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
2018-05-24 14:42:36 +00:00
Zuul f30aa7a97f Merge "Fix builddoc with sphinx <= 1.6" 2018-05-09 10:03:16 +00:00
Ian Wienand 0da792af3c Don't poke in pip for requests
Pip10 has removed the ability to poke inside it for things like
requests.  Explicitly add it to the venv.

Change-Id: Ie12168091dc4c737f3913720c1743bea666b5d9c
2018-04-30 11:29:58 +10:00
Ian Wienand a562b12446 Fix builddoc with sphinx <= 1.6
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
2018-04-24 14:27:40 +10:00
Zuul 7767c44ab1 Merge "Better Sem-Ver header handling" 2018-04-03 23:55:23 +00:00
Doug Hellmann 7b0374d680 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: Ic5a53fede983d15b8873708f213a87ce0f182277
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-29 16:07:24 +00:00
Ben Nemec 10fce39a7b Explicitly read setup.cfg as utf-8 on Python 3
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
2018-03-27 10:54:57 +00:00
Zuul 1f2c731485 Merge "builddoc: Treat '[pbr] autodoc_tree_excludes' as a multi-line opt" 2018-03-26 15:54:00 +00:00
Zuul 90849ed079 Merge "update parse test to use reliable comparison" 2018-03-26 15:54:00 +00:00
Stephen Finucane 1fe0ceab39 builddoc: Treat '[pbr] autodoc_tree_excludes' as a multi-line opt
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
2018-03-26 12:40:20 +00:00
Doug Hellmann 37a1ce7f85 update parse test to use reliable comparison
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: Doug Hellmann <doug@doughellmann.com>
Closes-Bug: #1758877
2018-03-26 12:39:28 +00:00
Clark Boylan 183b445c0f Better Sem-Ver header handling
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
2018-03-20 16:12:20 -07:00
Clark Boylan 7e2d1666f2 Make docs on env vars a little clearer
It was pointed out that the packager docs don't make it super obvious
that the env var settings that packagers can set are env vars. Add
export statements to the docs to imply it a bit more that we are talking
about env vars here.

Change-Id: I9e9eefa661994237a63b59dcefab11961ef339e1
Fixes-bug: 1724425
2018-03-20 14:44:07 -07:00
OpenStack Proposal Bot 56c27c21d1 Updated from global requirements
Change-Id: I7d0c896273f4de46e7d9dd494902adf5c1e19b30
2018-03-15 06:43:31 +00:00
Zuul 0cd0766862 Merge "future-proof invocation of apidoc" 2018-01-31 23:55:16 +00:00
OpenStack Proposal Bot 7db60850a2 Updated from global requirements
Change-Id: I0f72806130503a47a3caf737e2cea082d42fed55
2018-01-24 00:48:19 +00:00
Zuul ed45a18595 Merge "Updated from global requirements" 2018-01-18 06:50:22 +00:00
Doug Hellmann 8aaf237382 future-proof invocation of apidoc
Newer versions of Sphinx have moved the apidoc module into sphinx.ext
and the API is slightly different (the function expects sys.argv[1:]
instead of sys.argv[:]. So, figure out where we can import it from and
set a flag so we can invoke it properly. See this change in sphinx for
details:
87630c8ae8

Change-Id: I8235968f8a474c9e6088d935d0868570b2917c07
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-01-17 15:34:07 -05:00
Doug Hellmann ea3e5ab403 emit warning correctly
distutils.log has a warn() function but not a warning() function.

Change-Id: Iebfdb9e4d062d188ef9c73b66007a70f9c289ed2
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-01-17 15:34:07 -05:00
OpenStack Proposal Bot 090e1c1844 Updated from global requirements
Change-Id: I7eb765dc83e6983b5b52e518db5039a71efb036c
2018-01-17 20:26:54 +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
Zuul f4a1a7dec0 Merge "doc: Minor rework of usage doc" 2018-01-09 00:33:03 +00:00
Zuul 0fdb49eab7 Merge "doc: Rework features doc" 2018-01-09 00:25:01 +00:00
Zuul 8a9a6d80bf Merge "Support PEP 345 Project-URL metadata" 2018-01-08 13:54:33 +00:00
Stephen Finucane faba96da13 doc: Minor rework of usage doc
Reorder some section to highlight those that are totally unique to pbr
rather than simply modified.

Change-Id: I8cea0ae7d85409573dc6cf1a5d2b7a8ebc5fe8b8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-01-08 11:39:12 +00:00
Stephen Finucane 2493b3ad70 doc: Rework features doc
Break this document into sections and expand upon some of these.

Change-Id: Ia6a3eed984ce4257cce9df0997e6be2d8d3bc683
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-01-08 11:39:11 +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
Zuul 4e859e76d3 Merge "Deprecate testr and nose integration" 2018-01-04 04:09:24 +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
Zuul b26b135560 Merge "tests: Increase coverage of requirements parsing" 2017-12-15 03:49:31 +00:00
Zuul ae661b4a0a Merge "trivial: Move packaging tests to test_packaging" 2017-12-11 16:09:40 +00:00
Stephen Finucane 6c8455c8c5 tests: Increase coverage of requirements parsing
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
2017-12-06 11:34:25 +00:00
Stephen Finucane ec210af0f5 trivial: Move packaging tests to test_packaging
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
2017-12-06 11:32:44 +00:00
Monty Taylor 225e882322 Put test-requirements into an extra named 'test'
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
2017-12-06 11:01:52 +00:00
Zuul cd3e4f2949 Merge "Support Description-Content-Type metadata" 2017-12-05 07:51:44 +00:00