build: switch everything to Python 3 (#41347)
This commit is contained in:
parent
68681fe9eb
commit
7ea10d9f7c
30
Makefile
30
Makefile
|
@ -6,19 +6,19 @@ prefix = /usr
|
|||
all: themes.json icons css
|
||||
|
||||
static/includes/_data_uris.scss: $(wildcard static/includes/img/*)
|
||||
python make_data_uris.py static/includes/
|
||||
python3 make_data_uris.py static/includes/
|
||||
|
||||
static/toodego/_data_uris.scss: $(wildcard static/toodego/img/*)
|
||||
python make_data_uris.py static/toodego/
|
||||
python3 make_data_uris.py static/toodego/
|
||||
|
||||
static/lille/_data_uris.scss: $(wildcard static/lille/img/*)
|
||||
python make_data_uris.py static/lille/
|
||||
python3 make_data_uris.py static/lille/
|
||||
|
||||
static/lomme/_data_uris.scss: $(wildcard static/lomme/img/*)
|
||||
python make_data_uris.py static/lomme/
|
||||
python3 make_data_uris.py static/lomme/
|
||||
|
||||
static/hellemmes/_data_uris.scss: $(wildcard static/hellemmes/img/*)
|
||||
python make_data_uris.py static/hellemmes/
|
||||
python3 make_data_uris.py static/hellemmes/
|
||||
|
||||
themes.json: $(wildcard static/*/config.json) help/fr/misc-scss.page
|
||||
python3 create_themes_json.py
|
||||
|
@ -28,23 +28,23 @@ themes.json: $(wildcard static/*/config.json) help/fr/misc-scss.page
|
|||
%.css: %.scss $(wildcard static/includes/*.scss static/includes/*/*.scss) static/includes/_data_uris.scss static/lille/_data_uris.scss static/lomme/_data_uris.scss static/hellemmes/_data_uris.scss static/toodego/_data_uris.scss $$(wildcard $$(@D)/*.scss)
|
||||
sassc --sourcemap $< $@
|
||||
|
||||
css: $(shell python get_themes.py) static/portal-agent/css/agent-portal.css
|
||||
css: $(shell python3 get_themes.py) static/portal-agent/css/agent-portal.css
|
||||
rm -rf static/*/.sass-cache/
|
||||
|
||||
icons:
|
||||
# chateauroux
|
||||
cd src/ && python render-imgs-dashboard.py ../static/chateauroux/img/ --normal 333333 --selected 0779B7 --title FFFFFF --title-width 80
|
||||
cd src/ && python3 render-imgs-dashboard.py ../static/chateauroux/img/ --normal 333333 --selected 0779B7 --title FFFFFF --title-width 80
|
||||
# orleans
|
||||
cd src/ && python render-imgs-categories.py ../static/orleans/img/ --primary f05923 --secondary 34697D
|
||||
cd src/ && python render-imgs-dashboard.py ../static/orleans/img/ --normal FFFFFF --normal-width 30 --selected f05923 --selected-width 30 --title FFFFFF --title-width 80
|
||||
cd src/ && python3 render-imgs-categories.py ../static/orleans/img/ --primary f05923 --secondary 34697D
|
||||
cd src/ && python3 render-imgs-dashboard.py ../static/orleans/img/ --normal FFFFFF --normal-width 30 --selected f05923 --selected-width 30 --title FFFFFF --title-width 80
|
||||
# publik
|
||||
cd src/ && python render-imgs-categories.py ../static/publik/img/
|
||||
cd src/ && python render-imgs-dashboard.py ../static/publik/img/ --normal 4D4D4D --selected DF017A --title FFFFFF --title-width 80
|
||||
cd src/ && python3 render-imgs-categories.py ../static/publik/img/
|
||||
cd src/ && python3 render-imgs-dashboard.py ../static/publik/img/ --normal 4D4D4D --selected DF017A --title FFFFFF --title-width 80
|
||||
# somme
|
||||
cd src/ && python render-imgs-categories.py ../static/somme-cd80/img/ --primary A8002B --secondary A8002B
|
||||
cd src/ && python render-imgs-dashboard.py ../static/somme-cd80/img/ --normal 4D4D4D --selected 87A738 --title FFFFFF --title-width 80
|
||||
cd src/ && python render-imgs-categories.py ../static/hautes-alpes-2018/img/icon-rouge --primary B73720 --secondary B73720
|
||||
cd src/ && python render-imgs-categories.py ../static/hautes-alpes-2018/img/icon-bleu --primary 1C515E --secondary 1C515E
|
||||
cd src/ && python3 render-imgs-categories.py ../static/somme-cd80/img/ --primary A8002B --secondary A8002B
|
||||
cd src/ && python3 render-imgs-dashboard.py ../static/somme-cd80/img/ --normal 4D4D4D --selected 87A738 --title FFFFFF --title-width 80
|
||||
cd src/ && python3 render-imgs-categories.py ../static/hautes-alpes-2018/img/icon-rouge --primary B73720 --secondary B73720
|
||||
cd src/ && python3 render-imgs-categories.py ../static/hautes-alpes-2018/img/icon-bleu --primary 1C515E --secondary 1C515E
|
||||
# tournai
|
||||
cd static/tournai/ && for F in assets/*.svg; do inkscape --without-gui --file $$F --export-area-drawing --export-area-snap --export-png img/$$(basename $$F .svg).png --export-width 40; done
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ Homepage: http://git.entrouvert.org/publik-base-theme.git
|
|||
|
||||
Package: publik-base-theme
|
||||
Architecture: all
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, python-gadjo
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, python-gadjo, python3-gadjo
|
||||
Conflicts: python-authentic2 (< 2.1.20.742.gb6ee096-0),
|
||||
python-django (<= 1:1.11),
|
||||
python-xstatic-roboto-fontface (< 0.5.0.0),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /usr/bin/env python
|
||||
#! /usr/bin/env python3
|
||||
|
||||
import os
|
||||
|
||||
|
@ -6,4 +6,4 @@ for dirname in sorted(os.listdir('static')):
|
|||
config = os.path.join('static', dirname, 'config.json')
|
||||
if not os.path.exists(config):
|
||||
continue
|
||||
print 'static/%s/style.css' % dirname
|
||||
print('static/%s/style.css' % dirname)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /usr/bin/env python
|
||||
#! /usr/bin/env python3
|
||||
|
||||
import base64
|
||||
import os
|
||||
|
@ -18,8 +18,8 @@ for filename in os.listdir('img/'):
|
|||
filesize = os.stat('img/' + filename).st_size
|
||||
if filesize > 10000:
|
||||
continue
|
||||
filecontent = open('img/' + filename).read()
|
||||
b64 = base64.encodestring(filecontent).replace('\n', '')
|
||||
filecontent = open('img/' + filename, 'rb').read()
|
||||
b64 = base64.encodebytes(filecontent).decode('ascii').replace('\n', '')
|
||||
data_uris.append('$data_uri_%(varname)s: "data:%(mimetype)s;base64,%(b64)s" !default;' % locals())
|
||||
|
||||
open('_data_uris.scss', 'w').write('\n'.join(data_uris))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /usr/bin/env python
|
||||
#! /usr/bin/env python3
|
||||
|
||||
# publik-base-theme
|
||||
# Copyright (C) 2016 Entr'ouvert
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /usr/bin/env python
|
||||
#! /usr/bin/env python3
|
||||
|
||||
# publik-base-theme
|
||||
# Copyright (C) 2016 Entr'ouvert
|
||||
|
|
Loading…
Reference in New Issue