diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b0e303a..052629f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/.pylintrc b/.pylintrc index f407186..3a709f6 100644 --- a/.pylintrc +++ b/.pylintrc @@ -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. diff --git a/src/__init__.py b/src/diffuse/__init__.py similarity index 100% rename from src/__init__.py rename to src/diffuse/__init__.py diff --git a/src/constants.py.in b/src/diffuse/constants.py.in similarity index 100% rename from src/constants.py.in rename to src/diffuse/constants.py.in diff --git a/src/dialogs.py b/src/diffuse/dialogs.py similarity index 100% rename from src/dialogs.py rename to src/diffuse/dialogs.py diff --git a/src/diffuse.in b/src/diffuse/diffuse.in similarity index 100% rename from src/diffuse.in rename to src/diffuse/diffuse.in diff --git a/src/main.py b/src/diffuse/main.py similarity index 100% rename from src/main.py rename to src/diffuse/main.py diff --git a/src/diffuse/meson.build b/src/diffuse/meson.build new file mode 100644 index 0000000..b731de1 --- /dev/null +++ b/src/diffuse/meson.build @@ -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) diff --git a/src/preferences.py b/src/diffuse/preferences.py similarity index 100% rename from src/preferences.py rename to src/diffuse/preferences.py diff --git a/src/resources.py b/src/diffuse/resources.py similarity index 100% rename from src/resources.py rename to src/diffuse/resources.py diff --git a/src/utils.py b/src/diffuse/utils.py similarity index 100% rename from src/utils.py rename to src/diffuse/utils.py diff --git a/src/vcs/__init__.py b/src/diffuse/vcs/__init__.py similarity index 100% rename from src/vcs/__init__.py rename to src/diffuse/vcs/__init__.py diff --git a/src/vcs/bzr.py b/src/diffuse/vcs/bzr.py similarity index 100% rename from src/vcs/bzr.py rename to src/diffuse/vcs/bzr.py diff --git a/src/vcs/cvs.py b/src/diffuse/vcs/cvs.py similarity index 100% rename from src/vcs/cvs.py rename to src/diffuse/vcs/cvs.py diff --git a/src/vcs/darcs.py b/src/diffuse/vcs/darcs.py similarity index 100% rename from src/vcs/darcs.py rename to src/diffuse/vcs/darcs.py diff --git a/src/vcs/folder_set.py b/src/diffuse/vcs/folder_set.py similarity index 100% rename from src/vcs/folder_set.py rename to src/diffuse/vcs/folder_set.py diff --git a/src/vcs/git.py b/src/diffuse/vcs/git.py similarity index 100% rename from src/vcs/git.py rename to src/diffuse/vcs/git.py diff --git a/src/vcs/hg.py b/src/diffuse/vcs/hg.py similarity index 100% rename from src/vcs/hg.py rename to src/diffuse/vcs/hg.py diff --git a/src/vcs/mtn.py b/src/diffuse/vcs/mtn.py similarity index 100% rename from src/vcs/mtn.py rename to src/diffuse/vcs/mtn.py diff --git a/src/vcs/rcs.py b/src/diffuse/vcs/rcs.py similarity index 100% rename from src/vcs/rcs.py rename to src/diffuse/vcs/rcs.py diff --git a/src/vcs/svk.py b/src/diffuse/vcs/svk.py similarity index 100% rename from src/vcs/svk.py rename to src/diffuse/vcs/svk.py diff --git a/src/vcs/svn.py b/src/diffuse/vcs/svn.py similarity index 100% rename from src/vcs/svn.py rename to src/diffuse/vcs/svn.py diff --git a/src/vcs/vcs_interface.py b/src/diffuse/vcs/vcs_interface.py similarity index 100% rename from src/vcs/vcs_interface.py rename to src/diffuse/vcs/vcs_interface.py diff --git a/src/vcs/vcs_registry.py b/src/diffuse/vcs/vcs_registry.py similarity index 100% rename from src/vcs/vcs_registry.py rename to src/diffuse/vcs/vcs_registry.py diff --git a/src/widgets.py b/src/diffuse/widgets.py similarity index 100% rename from src/widgets.py rename to src/diffuse/widgets.py diff --git a/src/meson.build b/src/meson.build index b731de1..1e252f9 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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')