use venv instead of virtualenv

This commit is contained in:
Axel Kohlmeyer
2022-05-27 20:05:33 -04:00
parent 0b3efa4dd6
commit 886ad8359e

View File

@ -62,10 +62,10 @@ shutil.copy(args.lib,'lammps')
# create a virtual environment for building the wheel
shutil.rmtree('buildwheel',True)
try:
txt = subprocess.check_output([sys.executable, '-m', 'virtualenv', 'buildwheel', '-p', sys.executable], stderr=subprocess.STDOUT, shell=False)
txt = subprocess.check_output([sys.executable, '-m', 'venv', 'buildwheel'], stderr=subprocess.STDOUT, shell=False)
print(txt.decode('UTF-8'))
except subprocess.CalledProcessError as err:
sys.exit("Failed to create a virtualenv: {0}".format(err.output.decode('UTF-8')))
sys.exit("Failed to create a virtual environment: {0}".format(err.output.decode('UTF-8')))
# now run the commands to build the wheel. those must be in a separate script
# and run in subprocess, since this will use the virtual environment and