added python-version variable
This commit is contained in:
parent
3ac22718f9
commit
bc57729538
4 changed files with 12 additions and 4 deletions
|
|
@ -494,7 +494,7 @@ def generate_scripts(template_name, make_copy=False):
|
|||
@task
|
||||
def generate(param="help", make_copy=False):
|
||||
"""
|
||||
param can be one of settings, local, wsgi
|
||||
param can be one of settings, local, local.generated, wsgi
|
||||
make_copy must be set to True if you want it to actually do anthing
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -582,6 +582,12 @@ def _init_virtualenv(configuration, config, layout):
|
|||
# workon_home variable
|
||||
configuration.virtualenv.workon = config['virtualenv']['workon']
|
||||
|
||||
#
|
||||
# python version variable
|
||||
# note this is possibly stored as a float
|
||||
configuration.virtualenv.python_version = \
|
||||
config['virtualenv']['python-version']
|
||||
|
||||
virtualenv_requirements = "{branch}.txt".format(
|
||||
branch=configuration.project.branch)
|
||||
|
||||
|
|
@ -637,7 +643,9 @@ def _init_virtualenv(configuration, config, layout):
|
|||
|
||||
configuration.virtualenv.paths.sitepackages = os.path.join(
|
||||
configuration.virtualenv.paths.root,
|
||||
"lib", "python2.7", "site-packages")
|
||||
"lib",
|
||||
str(configuration.virtualenv.python_version),
|
||||
"site-packages")
|
||||
|
||||
#
|
||||
# path to the activate file for this virtualenv
|
||||
|
|
|
|||
|
|
@ -50,4 +50,4 @@ project:
|
|||
rootpath: /usr/local/var/www
|
||||
supervisor:
|
||||
paths: {conf: /usr/local/etc/supervisor/conf.d}
|
||||
virtualenv: {name: PROJECT_NAME, workon: /Users/ronny/.virtualenvs}
|
||||
virtualenv: {name: PROJECT_NAME, workon: /Users/ronny/.virtualenvs, python-version: 3.11}
|
||||
|
|
|
|||
|
|
@ -46,4 +46,4 @@ templates:
|
|||
conf: {output: nginx.conf, source: unixsocket.jinja2}
|
||||
file: unixsocket.jinja2
|
||||
path: usr/etc/nginx
|
||||
virtualenv: {workon: /home/website/.virtualenvs}
|
||||
virtualenv: {name: PROJECT_NAME, workon: /home/website/.virtualenvs, python-version: 3.10}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue