mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-21 12:20:21 -07:00
Build manpages as part of sdist (#53728)
* Build fixups This is in pursuit of making snapshots easier. * Allow overriding the python command used for generating man pages * Build the changelog prior to creating the sdist * Add the uninstalled ansible library to PYTHONPATH for changelog generation * Warn that python setup.py sdist may be incomplete; use make sdist or make snapshot instead. * Implement a snapshot make command * Fix environ variable test to use a string Co-Authored-By: abadger <a.badger@gmail.com>
This commit is contained in:
parent
baf255e4c1
commit
5ba7063f4f
2 changed files with 20 additions and 3 deletions
9
setup.py
9
setup.py
|
@ -136,6 +136,15 @@ class SDistCommand(SDist):
|
|||
|
||||
SDist.run(self)
|
||||
|
||||
# Print warnings at the end because no one will see warnings before all the normal status
|
||||
# output
|
||||
if os.environ.get('_ANSIBLE_SDIST_FROM_MAKEFILE', False) != '1':
|
||||
warnings.warn('When setup.py sdist is run from outside of the Makefile,'
|
||||
' the generated tarball may be incomplete. Use `make snapshot`'
|
||||
' to create a tarball from an arbitrary checkout or use'
|
||||
' `cd packaging/release && make release version=[..]` for official builds.',
|
||||
RuntimeWarning)
|
||||
|
||||
|
||||
def read_file(file_name):
|
||||
"""Read file and return its contents."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue