summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2019-03-18 12:43:38 -0700
committerGitHub <noreply@github.com>2019-03-18 12:43:38 -0700
commit5ba7063f4fa2818681275b5237fe7e416d45f98b (patch)
tree9b4db88bd8b66c81595b8468e4272c2510c96044 /setup.py
parentbaf255e4c17676e53b594f1b6d4258983bfe5b09 (diff)
downloadansible-5ba7063f4fa2818681275b5237fe7e416d45f98b.tar.gz
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>
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index b100f7ebd3..f9c85aab87 100644
--- a/setup.py
+++ b/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."""