Skip to content

Commit 032e9a3

Browse files
committed
Move all the diffuse package in its own directory
This helps the linters (pylint and flake8)
1 parent 81e87eb commit 032e9a3

26 files changed

+49
-48
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Pylint
2424
uses: cclauss/GitHub-Action-for-pylint@master
2525
with:
26-
args: "pylint src/vcs/ src/dialogs.py src/preferences.py src/resources.py src/utils.py src/widgets.py"
26+
args: "pylint src/**/*.py"
2727

2828
meson-build-test:
2929
runs-on: ubuntu-latest

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ignore=CVS
2424

2525
# Add files or directories matching the regex patterns to the ignore-list. The
2626
# regex matches against paths.
27-
ignore-paths=
27+
ignore-paths=src/diffuse/main.py
2828

2929
# Files or directories matching the regex patterns are skipped. The regex
3030
# matches against base names, not paths.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/diffuse/meson.build

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
2+
moduledir = join_paths(pkgdatadir, 'diffuse')
3+
sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'))
4+
5+
python = import('python')
6+
7+
conf = configuration_data()
8+
conf.set('PYTHON', python.find_installation('python3').path())
9+
conf.set('pkgdatadir', pkgdatadir)
10+
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
11+
12+
configure_file(
13+
input: 'diffuse.in',
14+
output: 'diffuse',
15+
configuration: conf,
16+
install: true,
17+
install_dir: get_option('bindir')
18+
)
19+
20+
conf = configuration_data()
21+
conf.set('VERSION', meson.project_version())
22+
conf.set('sysconfigdir', sysconfdir)
23+
conf.set('log_print_output', get_option('log_print_output'))
24+
conf.set('log_print_stack', get_option('log_print_stack'))
25+
conf.set('use_flatpak', get_option('use_flatpak'))
26+
27+
configure_file(
28+
input: 'constants.py.in',
29+
output: 'constants.py',
30+
configuration: conf,
31+
install: true,
32+
install_dir: moduledir
33+
)
34+
35+
diffuse_sources = [
36+
'__init__.py',
37+
'dialogs.py',
38+
'main.py',
39+
'preferences.py',
40+
'resources.py',
41+
'utils.py',
42+
'widgets.py',
43+
]
44+
45+
install_data(diffuse_sources, install_dir: moduledir)
46+
install_subdir('vcs', install_dir: moduledir, strip_directory: false)

0 commit comments

Comments
 (0)