mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	create-production-venv: Fix missing virtualenv dependency.
On newer distros like Xenial, Stretch, etc., we were incorrectly not installing the Python 3 version of the virtualenv package. This was accidentally working because most base images with Python already have this package too, but this was failing to install the right dependencies in our Docker builds, requiring unnecessary manual code. We fixed this some time ago for provision.py, but not for production.
This commit is contained in:
		@@ -8,13 +8,18 @@ ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__f
 | 
			
		||||
if ZULIP_PATH not in sys.path:
 | 
			
		||||
    sys.path.append(ZULIP_PATH)
 | 
			
		||||
 | 
			
		||||
from scripts.lib.zulip_tools import run
 | 
			
		||||
from scripts.lib.zulip_tools import run, subprocess_text_output
 | 
			
		||||
from scripts.lib.setup_venv import setup_virtualenv, VENV_DEPENDENCIES
 | 
			
		||||
 | 
			
		||||
parser = argparse.ArgumentParser(description="Create a production virtualenv with caching")
 | 
			
		||||
parser.add_argument("deploy_path")
 | 
			
		||||
args = parser.parse_args()
 | 
			
		||||
 | 
			
		||||
codename = subprocess_text_output(["lsb_release", "-cs"])
 | 
			
		||||
if codename != "trusty":
 | 
			
		||||
    # Workaround for the fact that trusty has a different package name here.
 | 
			
		||||
    VENV_DEPENDENCIES.append("virtualenv")
 | 
			
		||||
 | 
			
		||||
# install dependencies for setting up the virtualenv
 | 
			
		||||
run(["apt-get", "-y", "install"] + VENV_DEPENDENCIES)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user