Download:
parent 8:d5f5d21b8880
9:855a89f33e5e default tip
Anton Shestakov <av6@dwimlabs.net>, Mon, 28 Sep 2020 21:30:03 +0800
hgweb: run on Python 3

4 файлов изменено, 5 вставок(+), 5 удалений(-) [+]
playbook-example.yml file | annotate | diff | comparison | revisions
roles/hgweb/handlers/main.yml file | annotate | diff | comparison | revisions
roles/hgweb/tasks/main.yml file | annotate | diff | comparison | revisions
roles/hgweb/templates/hgweb.wsgi file | annotate | diff | comparison | revisions
--- a/playbook-example.yml Mon Sep 28 21:29:27 2020 +0800
+++ b/playbook-example.yml Mon Sep 28 21:30:03 2020 +0800
@@ -26,7 +26,7 @@
cache_valid_time: 3600
package:
- apache2
- - libapache2-mod-wsgi
+ - libapache2-mod-wsgi-py3
state: present
- name: Enable mod_wsgi
apache2_module:
--- a/roles/hgweb/handlers/main.yml Mon Sep 28 21:29:27 2020 +0800
+++ b/roles/hgweb/handlers/main.yml Mon Sep 28 21:30:03 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/main.yml Mon Sep 28 21:29:27 2020 +0800
+++ b/roles/hgweb/tasks/main.yml Mon Sep 28 21:30:03 2020 +0800
@@ -10,8 +10,8 @@
with_items:
- build-essential
- mercurial
- - python-dev
- - python-pygments # for hightlight extension
+ - python3-dev
+ - python3-pygments # for hightlight extension
tags: [packages, inert]
- include: appinstall.yml
--- a/roles/hgweb/templates/hgweb.wsgi Mon Sep 28 21:29:27 2020 +0800
+++ b/roles/hgweb/templates/hgweb.wsgi Mon Sep 28 21:30:03 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'):