Download:
child 33:01477dfb1836
parent 31:65daf0ee01ec
32:cbe814edc59d
Anton Shestakov <av6@dwimlabs.net>, Sun, 27 Sep 2020 19:00:21 +0800
hgweb: run on Python 3

4 файлов изменено, 5 вставок(+), 4 удалений(-) [+]
roles/hgweb/handlers/main.yml file | annotate | diff | comparison | revisions
roles/hgweb/tasks/appinstall.yml file | annotate | diff | comparison | revisions
roles/hgweb/tasks/main.yml file | annotate | diff | comparison | revisions
roles/hgweb/templates/hgweb.py file | annotate | diff | comparison | revisions
--- a/roles/hgweb/handlers/main.yml Sun Sep 27 18:59:01 2020 +0800
+++ b/roles/hgweb/handlers/main.yml Sun Sep 27 19:00:21 2020 +0800
@@ -1,6 +1,6 @@
---
- name: make local
- command: make --directory /home/{{ hgweb_user }}/hg/ local
+ command: make PYTHON=python3 --directory /home/{{ hgweb_user }}/hg/ local
become: yes
become_user: '{{ hgweb_user }}'
--- a/roles/hgweb/tasks/appinstall.yml Sun Sep 27 18:59:01 2020 +0800
+++ b/roles/hgweb/tasks/appinstall.yml Sun Sep 27 19:00:21 2020 +0800
@@ -51,9 +51,10 @@
- name: Set up venv for gunicorn
pip:
- virtualenv: /home/{{ hgweb_user }}/hgwebfiles/venv/
requirements: /home/{{ hgweb_user }}/hgwebfiles/requirements.txt
state: latest
+ virtualenv: /home/{{ hgweb_user }}/hgwebfiles/venv/
+ virtualenv_python: python3
notify:
- restart hgweb
...
--- a/roles/hgweb/tasks/main.yml Sun Sep 27 18:59:01 2020 +0800
+++ b/roles/hgweb/tasks/main.yml Sun Sep 27 19:00:21 2020 +0800
@@ -10,7 +10,7 @@
with_items:
- build-essential
- mercurial
- - python-dev
+ - python3-dev
- virtualenv
tags: [packages, inert]
--- a/roles/hgweb/templates/hgweb.py Sun Sep 27 18:59:01 2020 +0800
+++ b/roles/hgweb/templates/hgweb.py Sun Sep 27 19:00:21 2020 +0800
@@ -1,5 +1,5 @@
# Path to repo or hgweb config to serve (see 'hg help hgweb')
-config = "/home/{{ hgweb_user }}/hgwebfiles/hgweb.conf"
+config = b"/home/{{ hgweb_user }}/hgwebfiles/hgweb.conf"
# Uncomment and adjust if Mercurial is not installed system-wide
# (consult "installed modules" path from 'hg debuginstall'):