Ensure build is run before publish proceeds

This commit is contained in:
Kovid Goyal 2017-08-04 08:57:08 +05:30
parent b95efa171f
commit f6b8381018
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -149,6 +149,10 @@ class Publish(Command):
def pre_sub_commands(self, opts):
require_git_master()
require_clean_git()
if 'PUBLISH_BUILD_DONE' not in os.environ:
subprocess.check_call([sys.executable, 'setup.py', 'build'])
os.environ['PUBLISH_BUILD_DONE'] = '1'
os.execl(os.path.abspath('setup.py'), './setup.py', 'publish')
class PublishBetas(Command):