Add before_build option, that runs a shell command before 'pip wheel'

This commit is contained in:
Joe Rickerby
2017-04-10 21:42:12 +01:00
parent 56f9a37165
commit 2679cb7f46
9 changed files with 147 additions and 22 deletions
+11
View File
@@ -0,0 +1,11 @@
def prepare_command(command, python, pip):
'''
Preprocesses a command by expanding variables like {python} or {pip}.
For example, used for the before_build option, where the user would
like to run a command like `python setup.py test`. If the command should run on
Python 3, the user could write `{python} setup.py test`. This command would expand
it out to python2 or python3 as appropriate.
'''
return command.format(python=python, pip=pip)