import subprocess as sp

print('Warning: this setup.py uses flit, not setuptools.')
print('Behavior may not be exactly what you expect. Use at your own risk!')

sp.check_call(['flit', 'install', '--deps', 'production'])

import subprocess as sp
import sys
import os

print('Warning: this setup.py uses flit, not setuptools.')
print('Behavior may not be exactly what you expect. Use at your own risk!')

flit = os.path.join(os.path.dirname(sys.executable), 'flit')
cmd = [flit, 'install', '--deps', 'production']
print(" ".join(cmd))
sp.check_call(cmd)

Use flit that's been installed in the virtualenv
Use flit that's been installed in the virtualenv

  import subprocess as sp
+ import sys
+ import os
  
  print('Warning: this setup.py uses flit, not setuptools.')
  print('Behavior may not be exactly what you expect. Use at your own risk!')
  
+ flit = os.path.join(os.path.dirname(sys.executable), 'flit')
- sp.check_call(['flit', 'install', '--deps', 'production'])
+ cmd = [flit, 'install', '--deps', 'production']
+ print(" ".join(cmd))
+ sp.check_call(cmd)
  
Use flit that's been installed in the virtualenv
## Code Before:
import subprocess as sp

print('Warning: this setup.py uses flit, not setuptools.')
print('Behavior may not be exactly what you expect. Use at your own risk!')

sp.check_call(['flit', 'install', '--deps', 'production'])

## Instruction:
Use flit that's been installed in the virtualenv
## Code After:
import subprocess as sp
import sys
import os

print('Warning: this setup.py uses flit, not setuptools.')
print('Behavior may not be exactly what you expect. Use at your own risk!')

flit = os.path.join(os.path.dirname(sys.executable), 'flit')
cmd = [flit, 'install', '--deps', 'production']
print(" ".join(cmd))
sp.check_call(cmd)
