Skip to content

Commit

Permalink
Initial meson devenv
Browse files Browse the repository at this point in the history
  • Loading branch information
infirit committed Jul 31, 2024
1 parent 2682501 commit 37f62ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
8 changes: 3 additions & 5 deletions blueman/Constants.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ RFCOMM_WATCHER_PATH = "@LIBEXECDIR@/blueman-rfcomm-watcher"
import os

if 'BLUEMAN_SOURCE' in os.environ:
_dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
BIN_DIR = os.path.join(_dirname, 'apps')
ICON_PATH = os.path.join(_dirname, 'data', 'icons')
PIXMAP_PATH = os.path.join(_dirname, 'data', 'icons', 'pixmaps')
UI_PATH = os.path.join(_dirname, 'data', 'ui')
ICON_PATH = os.environ.get('ICON_PATH', "meson devenv failed")
PIXMAP_PATH = os.environ.get('PIXMAP_PATH', "meson devenv failed")
UI_PATH = os.environ.get('UI_PATH', "meson devenv failed")
11 changes: 10 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(
'blueman', 'c',
version: '2.4',
license: 'GPL3',
meson_version: '>=0.56.0',
meson_version: '>=0.58.0',
default_options: 'b_lundef=false'
)

Expand Down Expand Up @@ -53,6 +53,15 @@ conf_data.set('POLKIT', have_polkit)
conf_data.set('GETTEXT_PACKAGE', package_name)
conf_data.set('PYTHON', pyinstall.full_path())

#Setup devenv
PYTHON_PATHS=[join_paths(meson.current_source_dir(), 'blueman'), join_paths(meson.current_build_dir(), 'module')]
meson.add_devenv({'BLUEMAN_SOURCE': '1'})
meson.add_devenv({'PYTHONPATH': ':'.join(PYTHON_PATHS)})
#meson.add_devenv({'PATH': meson.current_build_dir()}, method: 'prepend')
#meson.add_devenv({'ICON_PATH': join_paths(meson.current_source_dir(), 'data', 'icons')})
#meson.add_devenv({'PIXMAP_PATH': join_paths(meson.current_source_dir(), 'data', 'icons', 'pixmaps')})
#meson.add_devenv({'UI_PATH': join_paths(meson.current_source_dir(), 'data', 'ui')})

# Check for build dependencies
pythonlib = pyinstall.dependency()
pygobject = dependency('pygobject-3.0', required: true)
Expand Down

0 comments on commit 37f62ad

Please sign in to comment.