Setuptools and sphinx [0] have removed support for building docs through
setup.py. This has broken imports which break our own local doc builds.
Lets just remove it all (including the tests) so that we are compatible
with modern setuptools and sphinx.
An alternative approach would be to do conditional imports and continue
to support this for old setuptools and sphinx. But that feels like a
dead end that will be difficult to test. Probably better to rip this
bandaid off.
[0] https://www.sphinx-doc.org/en/master/changes.html#id7
Change-Id: I65038caceb192f495288414079ca0f07ce6318bb
* 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
Update the logic that checks for sem-ver to strip out leading spaces.
This helps solve an issue during automated squashes appending a tab
character to the start of each line in a commit message.
Closes-Bug: #1977479
Change-Id: I6f56500c366fd9610d98507f01e8af21862e4421
Two unclosed file descriptors in packaging are raising
ResourceWarning on termination in newer Python interpreters. Make
sure they're closed as soon as we're done with them.
Change-Id: I07f500e1157da18de799eb0ff9bf82d3bcb46510
Setuptools 12.0 deprecated easy_install.get_script_header() when it
was released five years ago, and if called with PYTHONWARNINGS=error
raises a deprecation exception. Switch to the preferred class
method, but keep the original call as a fallback since it won't work
on older Setuptools versions (such as the 3.3 shipped with Ubuntu
Trusty). This continues 9a219f9a4f to
remove a second call for the same deprecated function.
Change-Id: I365075c2cff88283f92298ce2f5e53d263dc7f4b
Setuptools 12.0 deprecated easy_install.get_script_header() when it
was released five years ago, and if called with PYTHONWARNINGS=error
raises a deprecation exception. Switch to the preferred class
method, but keep the original call as a fallback since it won't work
on older Setuptools versions (such as the 3.3 shipped with Ubuntu
Trusty).
Change-Id: I2ba68a47dd3f309e356a6e88bf890ac2f80d99a0
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
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
The variable is not used by the generated script and the
socket calls will block in some contexts.
Change-Id: Id5f9c14e2bdda434883c24bb05359c0c36a1b569
This is comparable to the existing skip_authors and skip_changelog
options.
Change-Id: Icfefb20fb3c9b2e983e56f6e5440119d4dce2d3f
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
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>
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>
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
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
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
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>
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
It now appears safe to remove the Windows conditions that skip
executing override_get_script_args() and install_wrapper_scripts().
Having demonstrated that bdist_wheel works, it should now work for
sdist too, and experiments do indeed appear to bear that out.
Change-Id: Ic243a3ccd3aee0dcb17d6419bc44271f5ebe5551
Closes-Bug: 1521407
This commit 6fdf4e1086 have changed
the default binded ip, it binds one random interface on the system
instead of all. Break breaks all gate that expect the default to at
least listen on localhost.
This change restore the previous default.
Change-Id: I6323e66ea98d15c52b07c8e737fdd6f30aef0238
The packaged WSGI server currently only accepts a custom port.
This patch adds a new option to accept a custom interface. This is
useful in some cloud environments where there are restrictions on
which IP addresses are available to mount a server.
Change-Id: Iddf10bc422ae607b2d6bf2304dd032d7471ec458
Currently if an index is specified by either -i, --index-url or
--extra-index-url, the following error may be encountered when
setup is run.
Invalid requirement, parse error at "u'-i https'"
This patch ignores those lines in a requirements.txt file durning
parsing.
Closes-Bug: #1394999
Change-Id: Ie03f54ca7a7edad7a26fa1721f7b26532b65e760
codesearch.o.o shows a single, long-dead project using this [1]. Let's
just remove it and push people to set 'builders' instead in they really
want LaTeX.
[1] http://codesearch.openstack.org/?q=build_sphinx_latex
Change-Id: I820d9c540ae81717d7b33bbb4d2a4031b529b52c
When setup.cfg has a different value than pbr.version.VersionInfo(),
then the version call is unable to look up the right value in the
pkg_resources metadata. However, nothing in the current error message
communicates this to the user, which leads to them not being able to
look in all the right places for the possible error.
Change-Id: I31c4e0e2ed15986ba8274a0c5270a9d214ac4b48
It seems like we only (currently) exposed to rpm
version translation command when the deb version
translation command is equally useful (for those
that package deb things).
Change-Id: I0df175e5206d9d3a806bf33c486765ad1aa8aa6b
The script generated for wsgi-script entrypoint adds a argument for
listening on a specific port using argparse. Unfortunately it's not
compatible with oslo.config handling of config options, as used by
keystone for example. This fixes the situation by only parsing known
options.
Change-Id: I37f82e8d78a4288323854282da300c123561218a
Closes-Bug: #1501756
This test was relying on the short sleep allowing the subprocess
time to write to an external file. Rather than write to an
external file, have the output go to a pipe that the test process
can read so that the test doesn't have to guess how long to sleep.
Change-Id: I128a9dc5c7525d941f6e00c0073d983eab1e44e6
email.MessageError exception does not exist, so if an error occur, the
code block will fail completely. Fix the path to the correct class.
Co-Authored-By: Ian Cordasco <graffatcolmingov@gmail.com>
Change-Id: Ic4e69405ca6346191da66a86f0b7aa5b3b75bed6
Currently, when the sem-ver processing is searching the git history,
it stores the canonical version and uses that as the tag, which is
fine if the project uses the canonical version as a tag. Instead,
return the original tag so that history can be correctly checked.
Change-Id: I1b83fc3dc3dd287ae3b23fd4cba07fdfdd673a7f
Closes-Bug: 1561254
Downstream consumers, such as OpenStack Ansible, generate wheels for all
packages (including services). More and more services are moving to use
the wsgi_scripts entry-points provided and handled by pbr. Unfortunately,
these scripts are not generated during wheel creation unless we force
them to be generated because Setuptools and Distutils will only generate
console_scripts entry-points.
This also fixes the C extension on Python 3 because it was previously
broken.
Change-Id: Icecc8474028436e8b2fb752d576204d9439fb0e7
Closes-bug: #1542383
Enabled H405 multi line docstring summary not separated with an empty
line in tox testing.
Change-Id: I1a4bfbd2bad6eb2c132843ca21451807737121df
Closes-Bug:#1524176
When configured as an Apache WSGI module a race condition
is possible during keystone cache initialization.
The operation raises exception region.RegionAlreadyConfigured.
This is a result of the race condition involving global
'application' variable being initialized several times
(1 per thread).
Apache modwsgi documentation suggests protecting global objects
with thread locks.
Change-Id: Ib9e2207b0d1d9cee656736e94865fb404b6a868d
Related-Bug: 1482271
Since we don't strip comments from end of the requirements like:
requests-kerberos>=0.6;python_version=='2.7' # MIT
The currnet code ends up failing with a:
"Invalid environment marker"
We should strip the comments out before processing.
Closes-Bug: #1487835
Change-Id: I75d2e83a5f60f93e1c38d53fb4f0a29ba35120b1
git._iter_log_online() returns None in some cases for instance
when SKIP_WRITE_GIT_CHANGELOG is set to true. This is fixed by
returning an empty list in _iter_log_online.
Also the check if a changelog based on git should be written
was moved from git._iter_log_online to git.write_git_changelog
which makes more sense since some functions were calling
git._iter_log_online to get the changelog for other reasons than
writing it.
Additionally a unittest was added to check that setting the
environment variable SKIP_WRITE_GIT_CHANGELOG to true does not
break anything when retrieving the git version.
Change-Id: Ib12df23ab25b290dd394f9cb1456b8d5da57306a
Closes-Bug: 1467440
readthedocs uses 'setup.py install' to prepare trees for doc creation,
but ChangeLog is not currently created there, and doing so would be
nice. This won't affect develop invocations AFAICT, and even if it
did, the overheads are ~10% of the time to run 0 tests in Nova today -
e.g. quite tolerable.
Change-Id: I7bc18fc9ca2dbe852598cc79b2ad6273fc53557d
As we attempt to get more of OpenStack API servers to be runnable as a
regular WSGI application, we should provide support in PBR for
building these base scripts just like the console scripts.
This adds a new 'wsgi_scripts' group which builds a base script that
will run under mod_wsgi as expected. It also has a CLI fallback mode,
so that the application can be brought up as a wsgiref simple_server
for quick local testing and development. All wsgiref servers default
to binding to port 8000, but that can be overridden.
To support this, and possible future expansion of the script types,
the group list now iterates over a dictionary of group_name =>
template mappings.
This includes basic testing.
It also includes tests which would run an actual wsgi
environment. These are currently skipped as they can't be reliably run
in the gate for timing reasons on stdout processing.
Change-Id: I334639d7ecaad2703d1ff675880a314cc28e2334