Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
Add new command `pypireq2env` to duty.env
@duty
def pypireq2env(ctx):
'''
Installed requirements from python packages source to current environment.
'''
with open('setup.yml', 'r', encoding='utf-8') as vars_file:
conf = yaml.safe_load(vars_file)
list_packages = ' '.join(conf.get('REQUIREMENTS', ''))
if len(list_packages) > 0 and list_packages[0] != '':
ctx.run(f'pip3 install --upgrade {list_packages}', title='Installing requirements')
print('Please, don\'t forget to make freeze! You can do it with command \'duty freeze\'')