Move all the diffuse package in its own directory

This helps the linters (pylint and flake8)
This commit is contained in:
Romain Failliot 2021-11-21 13:29:38 -05:00
parent 81e87eb161
commit 032e9a398b
26 changed files with 49 additions and 48 deletions

View File

@ -23,7 +23,7 @@ jobs:
- name: Pylint
uses: cclauss/GitHub-Action-for-pylint@master
with:
args: "pylint src/vcs/ src/dialogs.py src/preferences.py src/resources.py src/utils.py src/widgets.py"
args: "pylint src/**/*.py"
meson-build-test:
runs-on: ubuntu-latest

View File

@ -24,7 +24,7 @@ ignore=CVS
# Add files or directories matching the regex patterns to the ignore-list. The
# regex matches against paths.
ignore-paths=
ignore-paths=src/diffuse/main.py
# Files or directories matching the regex patterns are skipped. The regex
# matches against base names, not paths.

46
src/diffuse/meson.build Normal file
View File

@ -0,0 +1,46 @@
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
moduledir = join_paths(pkgdatadir, 'diffuse')
sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'))
python = import('python')
conf = configuration_data()
conf.set('PYTHON', python.find_installation('python3').path())
conf.set('pkgdatadir', pkgdatadir)
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
configure_file(
input: 'diffuse.in',
output: 'diffuse',
configuration: conf,
install: true,
install_dir: get_option('bindir')
)
conf = configuration_data()
conf.set('VERSION', meson.project_version())
conf.set('sysconfigdir', sysconfdir)
conf.set('log_print_output', get_option('log_print_output'))
conf.set('log_print_stack', get_option('log_print_stack'))
conf.set('use_flatpak', get_option('use_flatpak'))
configure_file(
input: 'constants.py.in',
output: 'constants.py',
configuration: conf,
install: true,
install_dir: moduledir
)
diffuse_sources = [
'__init__.py',
'dialogs.py',
'main.py',
'preferences.py',
'resources.py',
'utils.py',
'widgets.py',
]
install_data(diffuse_sources, install_dir: moduledir)
install_subdir('vcs', install_dir: moduledir, strip_directory: false)

View File

@ -1,46 +1 @@
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
moduledir = join_paths(pkgdatadir, 'diffuse')
sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'))
python = import('python')
conf = configuration_data()
conf.set('PYTHON', python.find_installation('python3').path())
conf.set('pkgdatadir', pkgdatadir)
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
configure_file(
input: 'diffuse.in',
output: 'diffuse',
configuration: conf,
install: true,
install_dir: get_option('bindir')
)
conf = configuration_data()
conf.set('VERSION', meson.project_version())
conf.set('sysconfigdir', sysconfdir)
conf.set('log_print_output', get_option('log_print_output'))
conf.set('log_print_stack', get_option('log_print_stack'))
conf.set('use_flatpak', get_option('use_flatpak'))
configure_file(
input: 'constants.py.in',
output: 'constants.py',
configuration: conf,
install: true,
install_dir: moduledir
)
diffuse_sources = [
'__init__.py',
'dialogs.py',
'main.py',
'preferences.py',
'resources.py',
'utils.py',
'widgets.py',
]
install_data(diffuse_sources, install_dir: moduledir)
install_subdir('vcs', install_dir: moduledir, strip_directory: false)
subdir('diffuse')