Make bytecompile works again
This commit is contained in:
parent
e4803fdb3f
commit
3641ce6480
3
README
3
README
|
@ -1,4 +1,5 @@
|
||||||
Edgar Gadget Loader
|
Edgar Gadget Loader
|
||||||
|
===================
|
||||||
|
|
||||||
This module load python gadgets in Enlightenment.
|
This module load python gadgets in Enlightenment.
|
||||||
|
|
||||||
|
@ -15,7 +16,7 @@ Requirements
|
||||||
Install
|
Install
|
||||||
=======
|
=======
|
||||||
|
|
||||||
To install the edgar and all the incluede gadgets just use:
|
To install the edgar and all the included gadgets just use:
|
||||||
|
|
||||||
meson build
|
meson build
|
||||||
ninja -C build
|
ninja -C build
|
||||||
|
|
|
@ -5,7 +5,7 @@ gadget_name = 'audio'
|
||||||
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
||||||
|
|
||||||
|
|
||||||
# build gadget_name.edj
|
# Build gadget_name.edj
|
||||||
custom_target(gadget_name + '.edj',
|
custom_target(gadget_name + '.edj',
|
||||||
input : gadget_name + '.edc',
|
input : gadget_name + '.edc',
|
||||||
output : gadget_name + '.edj',
|
output : gadget_name + '.edj',
|
||||||
|
@ -17,14 +17,11 @@ custom_target(gadget_name + '.edj',
|
||||||
install : true
|
install : true
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: bytecompile gadget __init__.py
|
# Bytecompile gadget script
|
||||||
# py3_bytecompile = [py3, '-c', 'from py_compile import compile; compile("@INPUT@", "@OUTPUT@")']
|
custom_target('__init__.pyc',
|
||||||
#custom_target('__init__.pyc',
|
input : '__init__.py',
|
||||||
# input : '__init__.py',
|
output : '__init__.pyc',
|
||||||
# output : '__init__.pyc',
|
command : py3_bytecompile,
|
||||||
# command : py3_bytecompile,
|
install_dir: install_dir,
|
||||||
# install_dir: gadget_install_dir,
|
install : true
|
||||||
# install : true
|
)
|
||||||
# )
|
|
||||||
|
|
||||||
install_data('__init__.py', install_dir: install_dir)
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ gadget_name = 'calculator'
|
||||||
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
||||||
|
|
||||||
|
|
||||||
# build gadget_name.edj
|
# Build gadget_name.edj
|
||||||
custom_target(gadget_name + '.edj',
|
custom_target(gadget_name + '.edj',
|
||||||
input : gadget_name + '.edc',
|
input : gadget_name + '.edc',
|
||||||
output : gadget_name + '.edj',
|
output : gadget_name + '.edj',
|
||||||
|
@ -17,5 +17,12 @@ custom_target(gadget_name + '.edj',
|
||||||
install : true
|
install : true
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: bytecompile gadget __init__.py
|
# Bytecompile gadget script
|
||||||
install_data('__init__.py', install_dir: install_dir)
|
custom_target('__init__.pyc',
|
||||||
|
input : '__init__.py',
|
||||||
|
output : '__init__.pyc',
|
||||||
|
command : py3_bytecompile,
|
||||||
|
install_dir: install_dir,
|
||||||
|
install : true
|
||||||
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ gadget_name = 'cpu'
|
||||||
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
||||||
|
|
||||||
|
|
||||||
# build gadget_name.edj
|
# Build gadget_name.edj
|
||||||
custom_target(gadget_name + '.edj',
|
custom_target(gadget_name + '.edj',
|
||||||
input : gadget_name + '.edc',
|
input : gadget_name + '.edc',
|
||||||
output : gadget_name + '.edj',
|
output : gadget_name + '.edj',
|
||||||
|
@ -17,5 +17,11 @@ custom_target(gadget_name + '.edj',
|
||||||
install : true
|
install : true
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: bytecompile gadget __init__.py
|
# Bytecompile gadget script
|
||||||
install_data('__init__.py', install_dir: install_dir)
|
custom_target('__init__.pyc',
|
||||||
|
input : '__init__.py',
|
||||||
|
output : '__init__.pyc',
|
||||||
|
command : py3_bytecompile,
|
||||||
|
install_dir: install_dir,
|
||||||
|
install : true
|
||||||
|
)
|
||||||
|
|
|
@ -5,7 +5,7 @@ gadget_name = 'dropbox'
|
||||||
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
||||||
|
|
||||||
|
|
||||||
# build gadget_name.edj
|
# Build gadget_name.edj
|
||||||
custom_target(gadget_name + '.edj',
|
custom_target(gadget_name + '.edj',
|
||||||
input : gadget_name + '.edc',
|
input : gadget_name + '.edc',
|
||||||
output : gadget_name + '.edj',
|
output : gadget_name + '.edj',
|
||||||
|
@ -17,5 +17,11 @@ custom_target(gadget_name + '.edj',
|
||||||
install : true
|
install : true
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: bytecompile gadget __init__.py
|
# Bytecompile gadget script
|
||||||
install_data('__init__.py', install_dir: install_dir)
|
custom_target('__init__.pyc',
|
||||||
|
input : '__init__.py',
|
||||||
|
output : '__init__.pyc',
|
||||||
|
command : py3_bytecompile,
|
||||||
|
install_dir: install_dir,
|
||||||
|
install : true
|
||||||
|
)
|
||||||
|
|
|
@ -5,7 +5,7 @@ gadget_name = 'led_clock'
|
||||||
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
||||||
|
|
||||||
|
|
||||||
# build gadget_name.edj
|
# Build gadget_name.edj
|
||||||
custom_target(gadget_name + '.edj',
|
custom_target(gadget_name + '.edj',
|
||||||
input : gadget_name + '.edc',
|
input : gadget_name + '.edc',
|
||||||
output : gadget_name + '.edj',
|
output : gadget_name + '.edj',
|
||||||
|
@ -17,5 +17,11 @@ custom_target(gadget_name + '.edj',
|
||||||
install : true
|
install : true
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: bytecompile gadget __init__.py
|
# Bytecompile gadget script
|
||||||
install_data('__init__.py', install_dir: install_dir)
|
custom_target('__init__.pyc',
|
||||||
|
input : '__init__.py',
|
||||||
|
output : '__init__.pyc',
|
||||||
|
command : py3_bytecompile,
|
||||||
|
install_dir: install_dir,
|
||||||
|
install : true
|
||||||
|
)
|
||||||
|
|
|
@ -5,7 +5,7 @@ gadget_name = 'mem'
|
||||||
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
||||||
|
|
||||||
|
|
||||||
# build gadget_name.edj
|
# Build gadget_name.edj
|
||||||
custom_target(gadget_name + '.edj',
|
custom_target(gadget_name + '.edj',
|
||||||
input : gadget_name + '.edc',
|
input : gadget_name + '.edc',
|
||||||
output : gadget_name + '.edj',
|
output : gadget_name + '.edj',
|
||||||
|
@ -17,5 +17,11 @@ custom_target(gadget_name + '.edj',
|
||||||
install : true
|
install : true
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: bytecompile gadget __init__.py
|
# Bytecompile gadget script
|
||||||
install_data('__init__.py', install_dir: install_dir)
|
custom_target('__init__.pyc',
|
||||||
|
input : '__init__.py',
|
||||||
|
output : '__init__.pyc',
|
||||||
|
command : py3_bytecompile,
|
||||||
|
install_dir: install_dir,
|
||||||
|
install : true
|
||||||
|
)
|
||||||
|
|
|
@ -5,7 +5,7 @@ gadget_name = 'netspeed'
|
||||||
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
install_dir = join_paths(gadgets_install_dir, gadget_name)
|
||||||
|
|
||||||
|
|
||||||
# build gadget_name.edj
|
# Build gadget_name.edj
|
||||||
custom_target(gadget_name + '.edj',
|
custom_target(gadget_name + '.edj',
|
||||||
input : gadget_name + '.edc',
|
input : gadget_name + '.edc',
|
||||||
output : gadget_name + '.edj',
|
output : gadget_name + '.edj',
|
||||||
|
@ -17,5 +17,11 @@ custom_target(gadget_name + '.edj',
|
||||||
install : true
|
install : true
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: bytecompile gadget __init__.py
|
# Bytecompile gadget script
|
||||||
install_data('__init__.py', install_dir: install_dir)
|
custom_target('__init__.pyc',
|
||||||
|
input : '__init__.py',
|
||||||
|
output : '__init__.pyc',
|
||||||
|
command : py3_bytecompile,
|
||||||
|
install_dir: install_dir,
|
||||||
|
install : true
|
||||||
|
)
|
||||||
|
|
|
@ -20,6 +20,8 @@ e_module_arch = dep_e.get_pkgconfig_variable('module_arch')
|
||||||
#### Python3 ####
|
#### Python3 ####
|
||||||
py3 = import('python').find_installation('python3', modules: ['efl', 'dbus'])
|
py3 = import('python').find_installation('python3', modules: ['efl', 'dbus'])
|
||||||
dep_py3 = py3.dependency(embed: true)
|
dep_py3 = py3.dependency(embed: true)
|
||||||
|
py3_bytecompile = [py3, meson.source_root() / 'meson_bytecompile.py',
|
||||||
|
'@INPUT@', '@OUTPUT@']
|
||||||
|
|
||||||
|
|
||||||
#### Install dirs ####
|
#### Install dirs ####
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import py_compile
|
||||||
|
|
||||||
|
py_compile.compile(sys.argv[1], sys.argv[2])
|
Loading…
Reference in New Issue