diff --git a/configure.in b/configure.in index 279762057..19b8a39c7 100644 --- a/configure.in +++ b/configure.in @@ -120,6 +120,7 @@ src/gen/plug/report/Makefile src/gen/proxy/Makefile src/gen/simple/Makefile src/gen/utils/Makefile +src/gen/utils/docgen/Makefile src/gui/Makefile src/gui/editors/Makefile src/gui/editors/displaytabs/Makefile @@ -136,7 +137,6 @@ src/gui/selectors/Makefile src/gui/views/Makefile src/gui/views/treemodels/Makefile src/gui/widgets/Makefile -src/docgen/Makefile src/plugins/Makefile src/plugins/docgen/Makefile src/plugins/drawreport/Makefile diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 3e0c25c6e..f3e89ed1e 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -218,6 +218,12 @@ src/gen/utils/image.py src/gen/utils/referent.py src/gen/utils/tree.py +# gen.utils.docgen +src/gen/utils/docgen/__init__.py +src/gen/utils/docgen/CSVTab.py +src/gen/utils/docgen/ODSTab.py +src/gen/utils/docgen/TabbedDoc.py + # gui - GUI code src/gui/__init__.py src/gui/autocomp.py diff --git a/src/Makefile.am b/src/Makefile.am index 4a7361c46..f9899048d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,6 @@ SUBDIRS = \ cli \ data \ - docgen \ gen \ gui \ images \ diff --git a/src/gen/utils/Makefile.am b/src/gen/utils/Makefile.am index b11078dc9..e4c6cc41e 100644 --- a/src/gen/utils/Makefile.am +++ b/src/gen/utils/Makefile.am @@ -4,6 +4,8 @@ # but that is not necessarily portable. # If not using GNU make, then list all .py files individually +SUBDIRS = docgen + pkgpythondir = $(datadir)/@PACKAGE@/gen/utils pkgpython_PYTHON = \ diff --git a/src/docgen/CSVTab.py b/src/gen/utils/docgen/CSVTab.py similarity index 98% rename from src/docgen/CSVTab.py rename to src/gen/utils/docgen/CSVTab.py index 221d0f3ad..e395add60 100644 --- a/src/docgen/CSVTab.py +++ b/src/gen/utils/docgen/CSVTab.py @@ -32,7 +32,7 @@ import csv # gramps modules # #------------------------------------------------------------------------- -from docgen import TabbedDoc +from TabbedDoc import * class CSVTab(TabbedDoc): diff --git a/src/docgen/Makefile.am b/src/gen/utils/docgen/Makefile.am similarity index 65% rename from src/docgen/Makefile.am rename to src/gen/utils/docgen/Makefile.am index 37ed7754f..4c1ca27dc 100644 --- a/src/docgen/Makefile.am +++ b/src/gen/utils/docgen/Makefile.am @@ -3,19 +3,21 @@ # Use GNU make's ':=' syntax for nice wildcard use. # If not using GNU make, then list all .py files individually -docgendir=$(prefix)/share/gramps/docgen +pkgpythondir = $(datadir)/@PACKAGE@/gen/utils/docgen -docgen_PYTHON = \ +pkgpython_PYTHON = \ __init__.py \ CSVTab.py \ ODSTab.py \ TabbedDoc.py +pkgpyexecdir = @pkgpyexecdir@/gen/utils/docgen + # Clean up all the byte-compiled files MOSTLYCLEANFILES = *pyc *pyo -GRAMPS_PY_MODPATH = "../" +GRAMPS_PY_MODPATH = "../../../" pycheck: (export PYTHONPATH=$(GRAMPS_PY_MODPATH); \ - pychecker $(docgen_PYTHON)); + pychecker $(pkgpython_PYTHON)); diff --git a/src/docgen/ODSTab.py b/src/gen/utils/docgen/ODSTab.py similarity index 100% rename from src/docgen/ODSTab.py rename to src/gen/utils/docgen/ODSTab.py diff --git a/src/docgen/TabbedDoc.py b/src/gen/utils/docgen/TabbedDoc.py similarity index 100% rename from src/docgen/TabbedDoc.py rename to src/gen/utils/docgen/TabbedDoc.py diff --git a/src/docgen/__init__.py b/src/gen/utils/docgen/__init__.py similarity index 100% rename from src/docgen/__init__.py rename to src/gen/utils/docgen/__init__.py diff --git a/src/gui/views/listview.py b/src/gui/views/listview.py index 83978a670..30ad8d007 100644 --- a/src/gui/views/listview.py +++ b/src/gui/views/listview.py @@ -960,7 +960,7 @@ class ListView(NavigationView): The output file type is determined by the type variable. """ - from docgen import CSVTab, ODSTab + from gen.utils.docgen import CSVTab, ODSTab ofile = None data_cols = [pair[1] for pair in self.column_order() if pair[0]] diff --git a/src/plugins/tool/eventcmp.py b/src/plugins/tool/eventcmp.py index 600cdcca6..19d7e4579 100644 --- a/src/plugins/tool/eventcmp.py +++ b/src/plugins/tool/eventcmp.py @@ -49,7 +49,7 @@ from gui.filters import build_filter_model from gen.sort import Sort from gen.utils.file import get_unicode_path_from_file_chooser from gui.utils import ProgressMeter -from docgen import ODSTab +from gen.utils.docgen import ODSTab import const from gen.errors import WindowActiveError import gen.datehandler