From: JinWang An Date: Mon, 28 Dec 2020 04:45:15 +0000 (+0900) Subject: Imported Upstream version 3.0.0 X-Git-Tag: upstream/3.0.0^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48287478df39f0279defafc27207800f75bb89d0;p=platform%2Fupstream%2Fpython3-pbr.git Imported Upstream version 3.0.0 --- diff --git a/AUTHORS b/AUTHORS index d93725a..bbe67ad 100644 --- a/AUTHORS +++ b/AUTHORS @@ -36,6 +36,7 @@ Eric Windisch Erik M. Bray Eugene Kirpichov Florian Wilhelm +Gage Hugo Gary Kotton Giampaolo Lauria Ian Cordasco diff --git a/ChangeLog b/ChangeLog index 2218ced..a1529c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,21 @@ CHANGES ======= +3.0.0 +----- + +* Remove 'build\_sphinx\_latex' +* Stop building man pages by default +* docs: Use definition lists +* add image.nonlocal\_uri to the list of warnings ignored +* doc: Document Sphinx integration +* add changelog to published documentation + 2.1.0 ----- -* Lazy import pkg_resources +* Lazy import pkg\_resources +* Add Changelog build handling for invalid chars * Initialize sphinx config using application instead of config * Updated from global requirements * Also generate XML coverage report @@ -71,7 +82,7 @@ CHANGES * package: fix wrong catch in email parsing * Sort 'pbr freeze' output * Do not convert git tags when searching history -* Include wsgi_scripts in generated wheels +* Include wsgi\_scripts in generated wheels * Correct the indentation in the classifiers example * Do not silently drop markers that fail to evaluate * Clarifications around tags and version numbers @@ -105,7 +116,7 @@ CHANGES ----- * Handle the case where cmd.distribution has no pbr attribute -* test_integration cleanups +* test\_integration cleanups * Remove redundant testscenarios glue * Add standard code coverage configuration file * Add shields.io version/downloads links/badges into README.rst @@ -119,7 +130,7 @@ CHANGES 1.7.0 ----- -* Have pbr egg_info.writer check PBR is enabled +* Have pbr egg\_info.writer check PBR is enabled 1.6.0 ----- @@ -142,7 +153,7 @@ CHANGES * Updated from global requirements * Updated from global requirements * Show how long the git querying takes -* Add wsgi_scripts support to PBR +* Add wsgi\_scripts support to PBR * Updated from global requirements 1.3.0 @@ -151,9 +162,9 @@ CHANGES * Wrap env markers in parens * Updated from global requirements * Add more documentation around building docs -* Expose a 'rpm_version' extra command +* Expose a 'rpm\_version' extra command * Updated from global requirements -* Use string for 'OS_TEST_TIMEOUT' default +* Use string for 'OS\_TEST\_TIMEOUT' default * Updated from global requirements * This documents the use of comments that work between 2.6, 2.7 and 3.4 @@ -161,20 +172,20 @@ CHANGES ----- * Strip markers from test requirements -* Add build_sphinx test coverage +* Add build\_sphinx test coverage 1.1.1 ----- -* Revert "Remove sphinx_config.init_values() manual call" +* Revert "Remove sphinx\_config.init\_values() manual call" 1.1.0 ----- * Fix test case to be runnable with gnupg 2.1 -* More explicit data_files install location docs +* More explicit data\_files install location docs * Move CapturedSubprocess fixture to base -* Remove sphinx_config.init_values() manual call +* Remove sphinx\_config.init\_values() manual call * Updated from global requirements * builddoc: allow to use fnmatch-style exclusion for autodoc * doc: add some basic doc about pbr doc options @@ -184,7 +195,7 @@ CHANGES 1.0.1 ----- -* Remove self.pre_run calls in packaging.py +* Remove self.pre\_run calls in packaging.py * Add kerberos deps to build the kerberos wheel * Update hacking to 0.10.x series @@ -202,7 +213,7 @@ CHANGES ------ * Issue #1450210: Preversioning rc tag handling -* Stop testing setup.py easy_install behaviour +* Stop testing setup.py easy\_install behaviour * Test pip install -e of projects * Build all the wheels in one pass rather than many * Improve integration.sh @@ -230,8 +241,8 @@ CHANGES 0.10.7 ------ -* _get_revno only returns a commit count -* Move write_pbr_json to avoid issues with nose +* \_get\_revno only returns a commit count +* Move write\_pbr\_json to avoid issues with nose * Properly check for git before getting git dir * Port in git sha changes from 0.10 line @@ -243,7 +254,7 @@ CHANGES 0.10.5 ------ -* Move write_pbr_json to avoid issues with nose +* Move write\_pbr\_json to avoid issues with nose 0.10.4 ------ @@ -270,7 +281,7 @@ CHANGES * Add user.name to git config in tests * Honour validly tagged versions * autodoc: allow to exclude modules from auto-generation -* tests: factorize has_opt handling +* tests: factorize has\_opt handling * Support reading versions from wheels * Only consider tags that look like versions * Refactor oneline changelog walking @@ -281,7 +292,7 @@ CHANGES * Allow for inclusion of authors and changelog when building docs * Work toward Python 3.4 support and testing * Accept capitalized Sem-Ver headers -* use get_boolean_option for warnerrors +* use get\_boolean\_option for warnerrors * Handle more legacy version numbers * Look for and process sem-ver pseudo headers in git * Raise an error if preversion versions are too low @@ -307,7 +318,7 @@ CHANGES * Restore Monkeypatched Distribution Instance * Register testr as a distutil entry point * Check for git before querying it for a version -* Allow _run_cmd to run commands in any directory +* Allow \_run\_cmd to run commands in any directory * Make setUp fail if sdist fails * Permit pre-release versions with git metadata * Un-nest some sections of code @@ -321,7 +332,7 @@ CHANGES 0.8.1 ----- -* pbr/testr_command.py: Add logging +* pbr/testr\_command.py: Add logging * Documentation updates * Fixed a typo in the documentation * Make source configurable when using --coverage @@ -332,7 +343,7 @@ CHANGES 0.8.0 ----- -* Use unicode_literals import instead of u'unicode' notation +* Use unicode\_literals import instead of u'unicode' notation * Add support for nested requirements files * Remove pip version specifier * Make tools/integration.sh take a branch @@ -342,14 +353,14 @@ CHANGES 0.7.0 ----- -* Factor run_cmd out of the base class -* Return the real class in VersionInfo __repr__ +* Factor run\_cmd out of the base class +* Return the real class in VersionInfo \_\_repr\_\_ * Fix up some docstrings * Init sphinx config values before accessing them * Remove copyright from empty files * Declare support for Python versions in setup.cfg * Updated from global requirements -* Remove unused _parse_mailmap() +* Remove unused \_parse\_mailmap() * Add support for python 3-<3.3 * Remove tox locale overrides * Do not force log verbosity level to info @@ -388,7 +399,7 @@ CHANGES 0.5.22 ------ -* Move base test case logic out of __init__.py +* Move base test case logic out of \_\_init\_\_.py * Comply with pep440 * Prevent ordereddict installation on 2.7 * Do not pass unicode where byte strings are wanted @@ -396,8 +407,8 @@ CHANGES * Get rid of PyPI URL override in integration test * Add a test for command registration * Switch away from tearDown for BaseTests -* Fix test_changelog when git isn't globally setup -* Rework run_shell_command +* Fix test\_changelog when git isn't globally setup +* Rework run\_shell\_command * Update tox config to use latest upgrades * Add a hint for users who don't have git installed * Add pypy to tox.ini @@ -413,16 +424,16 @@ CHANGES 0.5.21 ------ -* Replace setuptools_git with a smarter approach +* Replace setuptools\_git with a smarter approach * Clean up some style warnings * Consume the OpenStack mirror by default * Correct typo * Improve AUTHORS file generation -* Ensure _run_shell_command always returns same type +* Ensure \_run\_shell\_command always returns same type * Hierarchical sphinx API documentation generation * Add support for classmethod console scripts -* Add skip_pip_install to setup.cfg -* Remove missing_reuqires optimization +* Add skip\_pip\_install to setup.cfg +* Remove missing\_reuqires optimization * Use the same logic everywhere for requirements files 0.5.20 @@ -433,14 +444,14 @@ CHANGES * Install jeepyb and requirements from REPODIR * Stop trying to install old pip and setuptools * Add support for globbing in data files -* Revert include_package_data change -* Also patch easy_install script creation +* Revert include\_package\_data change +* Also patch easy\_install script creation * Loop over test output for better readability * Add more documentation * We force installs via pip, we should declare it * Fix python 3.3 tests -* Replace entry_points console_scripts -* Fix integer_types type under python 3 +* Replace entry\_points console\_scripts +* Fix integer\_types type under python 3 * Remove the need to specify the pbr hook * Move d2to1 more into the source tree * Set defaults directly in option processing @@ -487,7 +498,7 @@ CHANGES 0.5.15 ------ -* Use pip instead of easy_install for installation +* Use pip instead of easy\_install for installation * Skip git-checkout related tests when .git is missing * Refactor hooks file @@ -499,7 +510,7 @@ CHANGES 0.5.12 ------ -* Explicitly install install_requires +* Explicitly install install\_requires * More python3 compatibility * python3: Use six everywhere * Add vim and emacs files to .gitignore @@ -512,7 +523,7 @@ CHANGES * Fix author and changelog skipping * Fix doc autoindexing -* Changed _get_git_directory() to use git itself +* Changed \_get\_git\_directory() to use git itself * python3: Python3.x compatibility * Cosmetic doc fixes * Make parse errors meaningful @@ -539,7 +550,7 @@ CHANGES 0.5.6 ----- -* Using __file__ was getting the wrong location +* Using \_\_file\_\_ was getting the wrong location * Add support for configuring pbr sphinx options * Add support for warnings=errors * Fix authors generation from co-authored-by @@ -564,7 +575,7 @@ CHANGES * Put stdout capture in the base test class * Amended README testing instructions * Update README with test running instructions -* Move setup_requires to setup_requires_dist +* Move setup\_requires to setup\_requires\_dist * Move sphinx to test-reuqirements * Deal with Sphinx import ordering * Add a better todo comment @@ -579,7 +590,7 @@ CHANGES * Fix things up to work with nova * Split out oslo.packaging * Fix two minor style things -* Fixes #20. Make sure the manifest_maker monkeypatch only occurs once and that it gets all its required locals encapsulated. This is why I hate any sort of monkey-patching, but it appears to be the only way to get this feature working +* Fixes #20. Make sure the manifest\_maker monkeypatch only occurs once and that it gets all its required locals encapsulated. This is why I hate any sort of monkey-patching, but it appears to be the only way to get this feature working * Fix 'except as' statements that were breaking things in Python 2.5 * Somehow neglected to include extra-file.txt used in the test for #15. Also moved the info log message that was causing othere tests to fail to only appear when commands are run that actually affect the manifest generation * Yet another Python 2.5 fix; I really ought to just set up my own 2.5 installation @@ -587,9 +598,9 @@ CHANGES * Adds six.py and makes the necessary tweaks to improve support for using d2to1 natively across Python versions * Fix 'except as' statements that were breaking things in Python 2.5 * Somehow neglected to include extra-file.txt used in the test for #15. Also moved the info log message that was causing othere tests to fail to only appear when commands are run that actually affect the manifest generation -* Adds support for the tests_require keyword from setuptools. Tested by eating our own dogfood -- ./setup.py test now works for d2to1's own setup +* Adds support for the tests\_require keyword from setuptools. Tested by eating our own dogfood -- ./setup.py test now works for d2to1's own setup * support test suite and test tests-require -* Patch manifest_maker to support extra_files--this is really the only way I can see to do this at all sensibly +* Patch manifest\_maker to support extra\_files--this is really the only way I can see to do this at all sensibly * This is a test that should really work to test this feature * openstack.common.setup: fails to get version from git * Use oslo-config-2013.1b3 @@ -600,7 +611,7 @@ CHANGES * Remove openstack.common.db.common * Add missing DBDuplicateEntry * Import sqlalchemy session/models/utils -* Implements import_group +* Implements import\_group * Fix Pep8 Warning * Fixes "is not", "not in" syntax usage * setup: count revs for revno if there are no tags @@ -609,8 +620,8 @@ CHANGES * Use revno and git sha for pre-release versioning * Add env var version override for packagers * trivial pep whitespace fix -* Remove write_requirements -* Rolling back to previous version of resolve_name; it's possible this can fail in the presence of a broken namespace package, but I want to make sure that's the case before trying to fix it +* Remove write\_requirements +* Rolling back to previous version of resolve\_name; it's possible this can fail in the presence of a broken namespace package, but I want to make sure that's the case before trying to fix it * Stop using no longer valid -E option for pip * oops - now compatible with python 3 * use regexp to parse the mailmap @@ -631,7 +642,7 @@ CHANGES * Add deprecated --logfile common opt * Allow nova and others to override some logging defaults * Fixing the trim for ListOp when reading from config file -* Fix set_default() with boolean CLI options +* Fix set\_default() with boolean CLI options * Rename utils.py to strutils.py * Improve cfg's argparse sub-parsers support * Make project pyflakes clean @@ -640,15 +651,15 @@ CHANGES * Hide the GroupAttr conf and group attributes * Fix broken --help with CommonConfigOpts * updating sphinx documentation -* Don't reference argparse._StoreAction +* Don't reference argparse.\_StoreAction * Fix minor coding style issue * Remove ConfigCliParser class * Add support for positional arguments * Use stock argparse behaviour for optional args * Use stock argparse --usage behaviour * Use stock argparse --version behaviour -* Remove add_option() method -* Completely remove cfg's disable_interspersed_args() +* Remove add\_option() method +* Completely remove cfg's disable\_interspersed\_args() * argparse support for cfg * Remove openstack.common.config and extensions * Fixes setup compatibility issue on Windows @@ -659,41 +670,41 @@ CHANGES * cfg: fix required if option has a dash * Fix a couple of file handle leaks, using with statements * Ignore the stackforge jenkins email address -* Extracted parse_host_port into network_utils +* Extracted parse\_host\_port into network\_utils * Add the rpc service and delete manager * Some changes I made weeks ago but forgot to commit * Added a method for parsing host:port pairs * Add basic periodic task infrastructure * Move manager.py and service.py into common * cfg: clean up None value handling -* Allow set_default and set_override to use None +* Allow set\_default and set\_override to use None * Tilde expansion for --config-file and --config-dir * Add multiple-driver support to the notifier api * Fix errors reported by pyflakes -* Add import_opt() method to ConfigOpts +* Add import\_opt() method to ConfigOpts * Remove unused imports -* Modifies _is_opt_registered fcn to check for duplicate opts +* Modifies \_is\_opt\_registered fcn to check for duplicate opts * fix bug lp:1019348,update openstack-common to support pep8 1.3 * cfg: allow empty config values -* Add SKIP_GENERATE_AUTHORS option to setup.py -* Add SKIP_WRITE_GIT_CHANGELOG option to setup.py +* Add SKIP\_GENERATE\_AUTHORS option to setup.py +* Add SKIP\_WRITE\_GIT\_CHANGELOG option to setup.py * Fix missing gettextutils in several modules * Fix up pre-versioning based on testing in glance * cfg: Fix typo in documentation * Fix mailmap -* Split read_versioninfo into a method +* Split read\_versioninfo into a method * Add common logging and notification * Add support for tag based versioning * Skip argparse when injecting requirements * Update common code to support pep 1.3. bug 1014216 -* Add autodoc generation to the build_sphinx command +* Add autodoc generation to the build\_sphinx command * Use 'is not None' instead of '!= None' * Adds support for bol and eol spaces to ini files * Add support to include config aliases * Create testutils with skip decorators * cfg: add a global CONF object * cfg: add generators for iterating over all options -* cfg: move constructor args to __call__() args +* cfg: move constructor args to \_\_call\_\_() args * Added support for proper bare URLs * Backslash continuation removal (common folsom-1) * Alphabetize imports in openstack/common/cfg.py @@ -703,26 +714,26 @@ CHANGES * cfg: use a list comprehension instead of map() * Encapsulate common sdist actions into a cmdclass * Truly handle mailmap entries for all combinations -* New ConfigOpts.find_file() for locating conf files +* New ConfigOpts.find\_file() for locating conf files * Handle authors existed before VCS was around * Support for directory source of config files * Provide file extension when when looking for files * Some refactoring of the cfg cache * Add caching to openstack.common.cfg * Add AUTHORS generation function -* Change behavior in utils.import_object() -* Move auth_str_equal() to a new authutils module +* Change behavior in utils.import\_object() +* Move auth\_str\_equal() to a new authutils module * Create openstack.common.timeutils * Typofix, OptionGroup should be OptGroup * Use absolute import for iniparser * Make 'yes' also a true boolean * Finish implementing MultiStrOpt * Avoid leaking secrets into config logging -* Add auth_str_equal() to common utils +* Add auth\_str\_equal() to common utils * Fix bug 954488 * fix restructuredtext formatting in docstrings -* Add ConfigOpts.print_help() -* Fixes a bug where entry_points in a setup.py are blanked out if there are no entry points defined in setup.cfg +* Add ConfigOpts.print\_help() +* Fixes a bug where entry\_points in a setup.py are blanked out if there are no entry points defined in setup.cfg * Promote more complete support for ISO 8601 time * cfg: fix a small comment typo * Several changes that I accidentally committed to d2to1's old repository. See the changes to the changelog for more details @@ -741,18 +752,18 @@ CHANGES * Add support to cfg for disabling interspersed args * Add new cfg module * import should not return an instance of the class -* use isinstance and types.* -* make fix_path a real function so it can be mock'd +* use isinstance and types.\* +* make fix\_path a real function so it can be mock'd * remove unused imports * merge in upstream * port execute and utcnow functions from nova -* pull parse_mailmap str_dict_replace from nova +* pull parse\_mailmap str\_dict\_replace from nova * reog from import merge * Rajaram/Vinkesh|Default xmlns for extension serialization can be overriden, added default factory for extension middleware * Rajaram/Vinkesh | Copied tests for wsgi from nova. Added default content/accept types in Request which can be overridden by projects. Copied tests for XML serialization of Extension Controller's action from nova * Rajaram/Vinkesh | Fixed the extension bug where custom collection actions' routes in resource extension were not getting registered * Vinkesh/Rajaram|Added nova's extension framework into common and tests for it -* Rajaram|renamed AppBaseException to OpenstackException and app_config_dir_name to config_dir as per jaypipes' feedback +* Rajaram|renamed AppBaseException to OpenstackException and app\_config\_dir\_name to config\_dir as per jaypipes' feedback * Rajaram/Vinkesh | Removed references to Glance in code * Adding syslog support * Add some more generic middleware, request context, utils, and versioning. Add basic template for server binary diff --git a/PKG-INFO b/PKG-INFO index 3b4f8eb..ef245d8 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pbr -Version: 2.1.0 +Version: 3.0.0 Summary: Python Build Reasonableness Home-page: http://docs.openstack.org/developer/pbr/ Author: OpenStack @@ -42,6 +42,7 @@ Description: Introduction * Documentation: http://docs.openstack.org/developer/pbr * Source: http://git.openstack.org/cgit/openstack-dev/pbr * Bugs: http://bugs.launchpad.net/pbr + * Change Log: https://docs.openstack.org/developer/pbr/history.html .. _d2to1: https://pypi.python.org/pypi/d2to1 .. _distutils2: https://pypi.python.org/pypi/Distutils2 diff --git a/README.rst b/README.rst index 1baf6bd..4c4ebba 100644 --- a/README.rst +++ b/README.rst @@ -34,6 +34,7 @@ them as quickly as possible. * Documentation: http://docs.openstack.org/developer/pbr * Source: http://git.openstack.org/cgit/openstack-dev/pbr * Bugs: http://bugs.launchpad.net/pbr +* Change Log: https://docs.openstack.org/developer/pbr/history.html .. _d2to1: https://pypi.python.org/pypi/d2to1 .. _distutils2: https://pypi.python.org/pypi/Distutils2 diff --git a/doc/source/history.rst b/doc/source/history.rst new file mode 100644 index 0000000..1d8f5cd --- /dev/null +++ b/doc/source/history.rst @@ -0,0 +1,5 @@ +================= + Release History +================= + +.. include:: ../../ChangeLog diff --git a/doc/source/index.rst b/doc/source/index.rst index 4c80aa6..764edf1 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -201,6 +201,7 @@ itself):: keywords = setup distutils + [files] packages = pbr @@ -209,18 +210,19 @@ itself):: etc/init = pbr.packaging.conf pbr.version.conf + [entry_points] console_scripts = pbr = pbr.cmd:main pbr.config.drivers = plain = pbr.cfg.driver:Plain -pbr provides its own section in these documents, ostensibly called `pbr`. Most -other sections are provided by setuptools and may influence either the build -itself or the output of various `setuptools commands`__. The remaining sections -are provided by libraries that provide setuptools extensions, such as -`extract_mesages` (provided by `Babel`__) or `sphinx_build` (provided by -`Sphinx`__). Some of these are described below. +`pbr` provides its own section in these documents, ostensibly called ``pbr``, +and provides a custom version of Sphinx's ``build_sphinx`` section. Most other +sections are provided by setuptools and may influence either the build itself +or the output of various `setuptools commands`__. The remaining sections are +provided by libraries that provide setuptools extensions, such as +``extract_mesages`` (provided by `Babel`__). Some of these are described below. __ https://setuptools.readthedocs.io/en/latest/setuptools.html#command-reference __ http://babel.pocoo.org/en/latest/setup.html @@ -248,57 +250,76 @@ The ``files`` section defines the install location of files in the package using three fundamental keys: ``packages``, ``namespace_packages``, and ``data_files``. -``packages`` is a list of top-level packages that should be installed. The -behavior of packages is similar to ``setuptools.find_packages`` in that it -recurses the python package hierarchy below the given top level and installs -all of it. If ``packages`` is not specified, it defaults to the value of the -``name`` field given in the ``[metadata]`` section. - -``namespace_packages`` is the same, but is a list of packages that provide -namespace packages. - -``data_files`` lists files to be installed. The format is an indented block -that contains key value pairs which specify target directory and source file -to install there. More than one source file for a directory may be indicated -with a further indented list. Source files are stripped of leading directories. -Additionally, `pbr` supports a simple file globbing syntax for installing -entire directory structures, thus:: - - [files] - data_files = - etc/pbr = etc/pbr/* - etc/neutron = - etc/api-paste.ini - etc/dhcp-agent.ini - etc/init.d = neutron.init - -will result in `/etc/neutron` containing `api-paste.ini` and `dhcp-agent.ini`, -both of which pbr will expect to find in the `etc` directory in the root of -the source tree. Additionally, `neutron.init` from that dir will be installed -in `/etc/init.d`. All of the files and directories located under `etc/pbr` in -the source tree will be installed into `/etc/pbr`. - -Note that this behavior is relative to the effective root of the environment -into which the packages are installed, so depending on available permissions -this could be the actual system-wide `/etc` directory or just a top-level `etc` -subdirectory of a virtualenv. +``packages`` + + A list of top-level packages that should be installed. The behavior of + packages is similar to ``setuptools.find_packages`` in that it recurses the + python package hierarchy below the given top level and installs all of it. If + ``packages`` is not specified, it defaults to the value of the ``name`` field + given in the ``[metadata]`` section. + +``namespace_packages`` + + Similar to ``packages``, but is a list of packages that provide namespace + packages. + +``data_files`` + + A list of files to be installed. The format is an indented block that + contains key value pairs which specify target directory and source file to + install there. More than one source file for a directory may be indicated + with a further indented list. Source files are stripped of leading + directories. Additionally, `pbr` supports a simple file globbing syntax for + installing entire directory structures, thus:: + + [files] + data_files = + etc/pbr = etc/pbr/* + etc/neutron = + etc/api-paste.ini + etc/dhcp-agent.ini + etc/init.d = neutron.init + + will result in `/etc/neutron` containing `api-paste.ini` and `dhcp-agent.ini`, + both of which pbr will expect to find in the `etc` directory in the root of + the source tree. Additionally, `neutron.init` from that dir will be installed + in `/etc/init.d`. All of the files and directories located under `etc/pbr` in + the source tree will be installed into `/etc/pbr`. + + Note that this behavior is relative to the effective root of the environment + into which the packages are installed, so depending on available permissions + this could be the actual system-wide `/etc` directory or just a top-level + `etc` subdirectory of a virtualenv. pbr ~~~ -The ``pbr`` section controls pbr specific options and behaviours. +The ``pbr`` section controls `pbr` specific options and behaviours. + +``autodoc_tree_index_modules`` + + A boolean option controlling whether `pbr` should generate an index of + modules using `sphinx-apidoc`. By default, all files except `setup.py` are + included, but this can be overridden using the ``autodoc_tree_excludes`` + option. + +``autodoc_tree_excludes`` + + A list of modules to exclude when building documentation using + `sphinx-apidoc`. Defaults to ``[setup.py]``. Refer to the `sphinx-apidoc man + page`_ for more information. -The ``autodoc_tree_index_modules`` is a boolean option controlling whether pbr -should generate an index of modules using ``sphinx-apidoc``. By default, -`setup.py` is excluded. The list of excluded modules can be specified with the -``autodoc_tree_excludes`` option. See the `sphinx-apidoc man page`_ for more -information. +``autodoc_index_modules`` -The ``autodoc_index_modules`` is a boolean option controlling whether `pbr` -should itself generates documentation for Python modules of the project. By -default, all found Python modules are included; some of them can be excluded -by listing them in ``autodoc_exclude_modules``. This list of modules can -contains `fnmatch` style pattern (e.g. `myapp.tests.*`) to exclude some modules. + A boolean option controlling whether `pbr` should itself generates + documentation for Python modules of the project. By default, all found Python + modules are included; some of them can be excluded by listing them in + ``autodoc_exclude_modules``. + +``autodoc_exclude_modules`` + + A list of modules to exclude when building module documentation using `pbr`. + `fnmatch` style pattern (e.g. `myapp.tests.*`) can be used. .. note:: @@ -310,6 +331,64 @@ contains `fnmatch` style pattern (e.g. `myapp.tests.*`) to exclude some modules. set. See the `Sphinx build configuration file`_ documentation for more information on configuring Sphinx. +.. versionchanged:: 2.0 + + The ``pbr`` section used to take a ``warnerrors`` option that would enable + the ``-W`` (Turn warnings into errors.) option when building Sphinx. This + feature was broken in 1.10 and was removed in pbr 2.0 in favour of the + ``[build_sphinx] warning-is-error`` provided in Sphinx 1.5+. + +build_sphinx +~~~~~~~~~~~~ + +The ``build_sphinx`` section is a version of the ``build_sphinx`` setuptools +plugin provided with Sphinx. This plugin extends the original plugin to add the +following: + +- Automatic generation of module documentation using the apidoc__ tool + +- Automatic configuration of the `project`, `version` and `release` settings + using information from `pbr` itself + +- Support for multiple builders using the ``builders`` configuration option + + .. note:: + + Sphinx 1.6 adds support for multiple builders using the default `builder` + option. You should refer to this file for more information. + +The version of ``build_sphinx`` provided by `pbr` provides a single additional +option. + +``builders`` + + A space or comma separated list of builders to run. For example, to build + both HTML and man page documentation, you would define the following in your + `setup.cfg`: + + .. code-block:: ini + + [build_sphinx] + builders = html,man + source-dir = doc/source + build-dir = doc/build + all-files = 1 + +For information on the remaining options, refer to the `Sphinx +documentation`__. In addition, the ``autodoc_index_modules``, +``autodoc_tree_index_modules``, ``autodoc_exclude_modules`` and +``autodoc_tree_excludes`` options in the ``pbr`` section will affect the output +of the automatic module documentation generation. + +.. versionchanged:: 3.0 + + The ``build_sphinx`` plugin used to default to building both HTML and man + page output. This is no longer the case, and you should explicitly set + ``builders`` to ``html man`` if you wish to retain this behavior. + +__ http://www.sphinx-doc.org/en/stable/man/sphinx-apidoc.html +__ http://www.sphinx-doc.org/en/stable/setuptools.html + entry_points ~~~~~~~~~~~~ @@ -394,11 +473,11 @@ environment, you can use:: Testing ------- -pbr overrides the ``setuptools`` hook ``test`` (i.e. ``setup.py -test``). The following sequence is followed: +`pbr` overrides the ``setuptools`` hook ``test`` (i.e. ``setup.py test``). The +following sequence is followed: #. If a ``.testr.conf`` file exists and `testrepository - `__ is installed, PBR + `__ is installed, `pbr` will use it as the test runner. See the ``testr`` documentation for more details. @@ -448,6 +527,7 @@ Additional Docs testing compatibility api/modules + history Indices and tables ================== diff --git a/pbr.egg-info/PKG-INFO b/pbr.egg-info/PKG-INFO index 3b4f8eb..ef245d8 100644 --- a/pbr.egg-info/PKG-INFO +++ b/pbr.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pbr -Version: 2.1.0 +Version: 3.0.0 Summary: Python Build Reasonableness Home-page: http://docs.openstack.org/developer/pbr/ Author: OpenStack @@ -42,6 +42,7 @@ Description: Introduction * Documentation: http://docs.openstack.org/developer/pbr * Source: http://git.openstack.org/cgit/openstack-dev/pbr * Bugs: http://bugs.launchpad.net/pbr + * Change Log: https://docs.openstack.org/developer/pbr/history.html .. _d2to1: https://pypi.python.org/pypi/d2to1 .. _distutils2: https://pypi.python.org/pypi/Distutils2 diff --git a/pbr.egg-info/SOURCES.txt b/pbr.egg-info/SOURCES.txt index 8f692b7..9041710 100644 --- a/pbr.egg-info/SOURCES.txt +++ b/pbr.egg-info/SOURCES.txt @@ -12,6 +12,7 @@ test-requirements.txt tox.ini doc/source/compatibility.rst doc/source/conf.py +doc/source/history.rst doc/source/index.rst doc/source/packagers.rst doc/source/semver.rst diff --git a/pbr/builddoc.py b/pbr/builddoc.py index 4f05673..343f7c3 100644 --- a/pbr/builddoc.py +++ b/pbr/builddoc.py @@ -63,7 +63,7 @@ def _find_modules(arg, dirname, files): class LocalBuildDoc(setup_command.BuildDoc): - builders = ['html', 'man'] + builders = ['html'] command_name = 'build_sphinx' sphinx_initialized = False @@ -134,16 +134,14 @@ class LocalBuildDoc(setup_command.BuildDoc): if self.sphinx_initialized: confoverrides['suppress_warnings'] = [ 'app.add_directive', 'app.add_role', - 'app.add_generic_role', 'app.add_node'] + 'app.add_generic_role', 'app.add_node', + 'image.nonlocal_uri', + ] app = application.Sphinx( self.source_dir, self.config_dir, self.builder_target_dir, self.doctree_dir, self.builder, confoverrides, status_stream, freshenv=self.fresh_env, warningiserror=self.warning_is_error) - sphinx_config = app.config - if self.builder == 'man' and len( - getattr(sphinx_config, 'man_pages', '')) == 0: - return self.sphinx_initialized = True try: @@ -225,8 +223,3 @@ class LocalBuildDoc(setup_command.BuildDoc): # handle Sphinx < 1.5.0 if not hasattr(self, 'warning_is_error'): self.warning_is_error = False - - -class LocalBuildLatex(LocalBuildDoc): - builders = ['latex'] - command_name = 'build_sphinx_latex' diff --git a/pbr/git.py b/pbr/git.py index e334af6..1c70194 100644 --- a/pbr/git.py +++ b/pbr/git.py @@ -143,6 +143,27 @@ def get_git_short_sha(git_dir=None): return None +def _clean_changelog_message(msg): + """Cleans any instances of invalid sphinx wording. + + This removes any instances of invalid characters or wording + that can be interpreted by sphinx as a warning or error + when translating the Changelog into an HTML file for + documentation building within projects. + + Currently removes: + * Escapes any '_' that sphinx can interpret as a link + * Escapes any '*' with sphinx will interpret as a new commit + + """ + + msg = msg.replace('*', '\*') + msg = msg.replace('_', '\_') + msg = msg.replace('`', '\`') + + return msg + + def _iter_changelog(changelog): """Convert a oneline log iterator to formatted strings. @@ -166,6 +187,7 @@ def _iter_changelog(changelog): if not msg.startswith("Merge "): if msg.endswith("."): msg = msg[:-1] + msg = _clean_changelog_message(msg) yield current_release, "* %(msg)s\n" % dict(msg=msg) first_line = False diff --git a/pbr/hooks/commands.py b/pbr/hooks/commands.py index d9b56b5..aa4db70 100644 --- a/pbr/hooks/commands.py +++ b/pbr/hooks/commands.py @@ -49,7 +49,6 @@ class CommandsConfig(base.BaseConfig): if packaging.have_sphinx(): self.add_command('pbr.builddoc.LocalBuildDoc') - self.add_command('pbr.builddoc.LocalBuildLatex') if os.path.exists('.testr.conf') and packaging.have_testr(): # There is a .testr.conf file. We want to use it. diff --git a/pbr/packaging.py b/pbr/packaging.py index 484cd24..a3527c9 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -536,11 +536,9 @@ try: # Import the symbols from their new home so the package API stays # compatible. LocalBuildDoc = builddoc.LocalBuildDoc - LocalBuildLatex = builddoc.LocalBuildLatex except ImportError: _have_sphinx = False LocalBuildDoc = None - LocalBuildLatex = None def have_sphinx(): diff --git a/pbr/tests/test_packaging.py b/pbr/tests/test_packaging.py index ab8ba49..69a8f79 100644 --- a/pbr/tests/test_packaging.py +++ b/pbr/tests/test_packaging.py @@ -270,8 +270,8 @@ class TestPackagingInGitRepoWithCommit(base.BaseTestCase): def setUp(self): super(TestPackagingInGitRepoWithCommit, self).setUp() - repo = self.useFixture(TestRepo(self.package_dir)) - repo.commit() + self.repo = self.useFixture(TestRepo(self.package_dir)) + self.repo.commit() def test_authors(self): self.run_setup('sdist', allow_fail=False) @@ -287,6 +287,29 @@ class TestPackagingInGitRepoWithCommit(base.BaseTestCase): # One commit, something should be in the ChangeLog list self.assertNotEqual(body, '') + def test_changelog_handles_astrisk(self): + self.repo.commit(message_content="Allow *.openstack.org to work") + self.run_setup('sdist', allow_fail=False) + with open(os.path.join(self.package_dir, 'ChangeLog'), 'r') as f: + body = f.read() + self.assertIn('\*', body) + + def test_changelog_handles_dead_links_in_commit(self): + self.repo.commit(message_content="See os_ for to_do about qemu_.") + self.run_setup('sdist', allow_fail=False) + with open(os.path.join(self.package_dir, 'ChangeLog'), 'r') as f: + body = f.read() + self.assertIn('os\_', body) + self.assertIn('to\_do', body) + self.assertIn('qemu\_', body) + + def test_changelog_handles_backticks(self): + self.repo.commit(message_content="Allow `openstack.org` to `work") + self.run_setup('sdist', allow_fail=False) + with open(os.path.join(self.package_dir, 'ChangeLog'), 'r') as f: + body = f.read() + self.assertIn('\`', body) + def test_manifest_exclude_honoured(self): self.run_setup('sdist', allow_fail=False) with open(os.path.join( diff --git a/pbr/tests/test_setup.py b/pbr/tests/test_setup.py index 0930e35..7aa74f6 100644 --- a/pbr/tests/test_setup.py +++ b/pbr/tests/test_setup.py @@ -165,7 +165,7 @@ class GitLogsTest(base.BaseTestCase): self.assertIn("------", changelog_contents) self.assertIn("Refactor hooks file", changelog_contents) self.assertIn( - "Bug fix: create_stack() fails when waiting", + "Bug fix: create\_stack() fails when waiting", changelog_contents) self.assertNotIn("Refactor hooks file.", changelog_contents) self.assertNotIn("182feb3", changelog_contents) @@ -179,7 +179,7 @@ class GitLogsTest(base.BaseTestCase): self.assertNotIn("ev)il", changelog_contents) self.assertNotIn("e(vi)l", changelog_contents) self.assertNotIn('Merge "', changelog_contents) - self.assertNotIn('1_foo.1', changelog_contents) + self.assertNotIn('1\_foo.1', changelog_contents) def test_generate_authors(self): author_old = u"Foo Foo " @@ -308,9 +308,8 @@ class BuildSphinxTest(BaseSphinxTest): build_doc = packaging.LocalBuildDoc(self.distr) build_doc.finalize_options() - self.assertEqual(2, len(build_doc.builders)) + self.assertEqual(1, len(build_doc.builders)) self.assertIn('html', build_doc.builders) - self.assertIn('man', build_doc.builders) build_doc = packaging.LocalBuildDoc(self.distr) build_doc.builders = ''