Make bytecompile works again

master
Davide Andreoli 3 years ago
parent e4803fdb3f
commit 3641ce6480
  1. 3
      README
  2. 21
      gadgets/audio/meson.build
  3. 13
      gadgets/calculator/meson.build
  4. 12
      gadgets/cpu/meson.build
  5. 12
      gadgets/dropbox/meson.build
  6. 12
      gadgets/led_clock/meson.build
  7. 12
      gadgets/mem/meson.build
  8. 12
      gadgets/netspeed/meson.build
  9. 2
      meson.build
  10. 5
      meson_bytecompile.py

@ -1,4 +1,5 @@
Edgar Gadget Loader
===================
This module load python gadgets in Enlightenment.
@ -15,7 +16,7 @@ Requirements
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
ninja -C build

@ -5,7 +5,7 @@ gadget_name = 'audio'
install_dir = join_paths(gadgets_install_dir, gadget_name)
# build gadget_name.edj
# Build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
@ -17,14 +17,11 @@ custom_target(gadget_name + '.edj',
install : true
)
# TODO: bytecompile gadget __init__.py
# py3_bytecompile = [py3, '-c', 'from py_compile import compile; compile("@INPUT@", "@OUTPUT@")']
#custom_target('__init__.pyc',
# input : '__init__.py',
# output : '__init__.pyc',
# command : py3_bytecompile,
# install_dir: gadget_install_dir,
# install : true
# )
install_data('__init__.py', install_dir: install_dir)
# Bytecompile gadget script
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 = 'calculator'
install_dir = join_paths(gadgets_install_dir, gadget_name)
# build gadget_name.edj
# Build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
@ -17,5 +17,12 @@ custom_target(gadget_name + '.edj',
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)
# Bytecompile gadget script
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)
# build gadget_name.edj
# Build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
@ -17,5 +17,11 @@ custom_target(gadget_name + '.edj',
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)
# Bytecompile gadget script
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)
# build gadget_name.edj
# Build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
@ -17,5 +17,11 @@ custom_target(gadget_name + '.edj',
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)
# Bytecompile gadget script
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)
# build gadget_name.edj
# Build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
@ -17,5 +17,11 @@ custom_target(gadget_name + '.edj',
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)
# Bytecompile gadget script
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)
# build gadget_name.edj
# Build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
@ -17,5 +17,11 @@ custom_target(gadget_name + '.edj',
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)
# Bytecompile gadget script
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)
# build gadget_name.edj
# Build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
@ -17,5 +17,11 @@ custom_target(gadget_name + '.edj',
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)
# Bytecompile gadget script
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 ####
py3 = import('python').find_installation('python3', modules: ['efl', 'dbus'])
dep_py3 = py3.dependency(embed: true)
py3_bytecompile = [py3, meson.source_root() / 'meson_bytecompile.py',
'@INPUT@', '@OUTPUT@']
#### Install dirs ####

@ -0,0 +1,5 @@
import sys
import py_compile
py_compile.compile(sys.argv[1], sys.argv[2])
Loading…
Cancel
Save