mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	This commit renames various source requirements files like `dev.txt`, `mypy.txt` etc to `dev.in`, `mypy.in` etc and various locked requirements files like `dev_lock.txt`, `mypy_lock.txt` etc to `dev.txt`, `mypy.txt` etc. This will help in emphasizing to the user that *.in are actually input to `update-locked-requirements` tool which should be run after updating any of these.
		
			
				
	
	
		
			26 lines
		
	
	
		
			820 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			820 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env python3
 | 
						|
 | 
						|
import os
 | 
						|
import argparse
 | 
						|
import sys
 | 
						|
 | 
						|
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 | 
						|
if ZULIP_PATH not in sys.path:
 | 
						|
    sys.path.append(ZULIP_PATH)
 | 
						|
 | 
						|
from scripts.lib.zulip_tools import run
 | 
						|
from scripts.lib.setup_venv import setup_virtualenv, THUMBOR_VENV_DEPENDENCIES
 | 
						|
 | 
						|
parser = argparse.ArgumentParser(description="Create a thumbor virtualenv with caching")
 | 
						|
parser.add_argument("deploy_path")
 | 
						|
args = parser.parse_args()
 | 
						|
 | 
						|
# install dependencies for setting up the virtualenv
 | 
						|
run(["apt-get", "-y", "install"] + THUMBOR_VENV_DEPENDENCIES)
 | 
						|
 | 
						|
venv_name = "zulip-thumbor-venv"
 | 
						|
cached_venv_path = setup_virtualenv(
 | 
						|
    os.path.join(args.deploy_path, venv_name),
 | 
						|
    os.path.join(ZULIP_PATH, "requirements", "thumbor.txt"),
 | 
						|
    virtualenv_args=['-p', 'python'])
 |