diff --git a/ChangeLog b/ChangeLog index f8dab00c1..822686885 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-01-26 Richard Taylor + * src/GrampsDb/Makefile.am: remove files + * src/GrampsDb/_GrampsDbConst.py: add license + * src/GrampsLocale/__init__.py: add license + * src/GrampsLocale/Makefile.am: add makefile + * src/BasicUtils/__init__.py: add license + * src/BasicUtils/Makefile.am: add makefile + * src/GrampsDbUtils/__init__.py: add license + * src/GrampsDbUtils/Makefile.am: add makefile + * src/GrampsDbUtils/_GrampsDbWRFactories.py: add license + * src/Makefile.am: add new directories + 2007-01-26 Richard Taylor * src/ViewManager.py: refactor GrampsDb and clean RelLib deps * src/Exporter.py: refactor GrampsDb and clean RelLib deps diff --git a/src/BasicUtils/Makefile.am b/src/BasicUtils/Makefile.am new file mode 100644 index 000000000..4c1bf7c0d --- /dev/null +++ b/src/BasicUtils/Makefile.am @@ -0,0 +1,26 @@ +# This is the src/BasicUtils level Makefile for Gramps +# We could use GNU make's ':=' syntax for nice wildcard use, +# but that is not necessarily portable. +# If not using GNU make, then list all .py files individually + +pkgdatadir = $(datadir)/@PACKAGE@/BasicUtils + +pkgdata_PYTHON = \ + BasicUtils.py\ + __init__.py + + +pkgpyexecdir = @pkgpyexecdir@/BasicUtils +pkgpythondir = @pkgpythondir@/BasicUtils + + +dist_pkgdata_DATA = + +# Clean up all the byte-compiled files +MOSTLYCLEANFILES = *pyc *pyo + +GRAMPS_PY_MODPATH = "../" + +pycheck: + (export PYTHONPATH=$(GRAMPS_PY_MODPATH); \ + pychecker $(pkgdata_PYTHON)); diff --git a/src/BasicUtils/__init__.py b/src/BasicUtils/__init__.py index eb6f95ccd..f982c1810 100644 --- a/src/BasicUtils/__init__.py +++ b/src/BasicUtils/__init__.py @@ -1 +1,23 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2004-2006 Donald N. Allingham +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +# $Id: $ + from BasicUtils import UpdateCallback diff --git a/src/GrampsDb/Makefile.am b/src/GrampsDb/Makefile.am index ae28ef0f6..7c811aa7c 100644 --- a/src/GrampsDb/Makefile.am +++ b/src/GrampsDb/Makefile.am @@ -7,8 +7,6 @@ pkgdatadir = $(datadir)/@PACKAGE@/GrampsDb pkgdata_PYTHON = \ _DbUtils.py \ - _GedcomInfo.py\ - _GedTokens.py\ _GrampsBSDDB.py\ _GrampsDbBase.py\ _GrampsDBCallback.py\ @@ -17,22 +15,15 @@ pkgdata_PYTHON = \ _GrampsGEDDB.py\ _GrampsInMemDB.py\ _GrampsXMLDB.py\ - __init__.py\ - _ReadGedcom.py\ - _ReadGrdb.py\ - _ReadXML.py\ - _WriteGedcom.py\ - _WriteGrdb.py\ - _WriteXML.py + _GrampsDbConst.py\ + __init__.py + pkgpyexecdir = @pkgpyexecdir@/GrampsDb pkgpythondir = @pkgpythondir@/GrampsDb -GLADEFILES = \ - gedcomimport.glade\ - gedcomexport.glade -dist_pkgdata_DATA = $(GLADEFILES) +dist_pkgdata_DATA = # Clean up all the byte-compiled files MOSTLYCLEANFILES = *pyc *pyo diff --git a/src/GrampsDb/_GrampsDbConst.py b/src/GrampsDb/_GrampsDbConst.py index 01e2cc63d..e671b62e2 100644 --- a/src/GrampsDb/_GrampsDbConst.py +++ b/src/GrampsDb/_GrampsDbConst.py @@ -1,3 +1,25 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2004-2006 Donald N. Allingham +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +# $Id: $ + import os #------------------------------------------------------------------------- diff --git a/src/GrampsDbUtils/Makefile.am b/src/GrampsDbUtils/Makefile.am new file mode 100644 index 000000000..39e0fb96a --- /dev/null +++ b/src/GrampsDbUtils/Makefile.am @@ -0,0 +1,36 @@ +# This is the src/GrampsDbUtils level Makefile for Gramps +# We could use GNU make's ':=' syntax for nice wildcard use, +# but that is not necessarily portable. +# If not using GNU make, then list all .py files individually + +pkgdatadir = $(datadir)/@PACKAGE@/GrampsDbUtils + +pkgdata_PYTHON = \ + _GedcomInfo.py\ + _GedTokens.py\ + __init__.py\ + _ReadGedcom.py\ + _ReadGrdb.py\ + _ReadXML.py\ + _WriteGedcom.py\ + _WriteGrdb.py\ + _WriteXML.py\ + _GrampsDbWRFactories.py + +pkgpyexecdir = @pkgpyexecdir@/GrampsDbUtils +pkgpythondir = @pkgpythondir@/GrampsDbUtils + +GLADEFILES = \ + gedcomimport.glade\ + gedcomexport.glade + +dist_pkgdata_DATA = $(GLADEFILES) + +# Clean up all the byte-compiled files +MOSTLYCLEANFILES = *pyc *pyo + +GRAMPS_PY_MODPATH = "../" + +pycheck: + (export PYTHONPATH=$(GRAMPS_PY_MODPATH); \ + pychecker $(pkgdata_PYTHON)); diff --git a/src/GrampsDbUtils/_GrampsDbWRFactories.py b/src/GrampsDbUtils/_GrampsDbWRFactories.py index 7f869ce3d..8303b7860 100644 --- a/src/GrampsDbUtils/_GrampsDbWRFactories.py +++ b/src/GrampsDbUtils/_GrampsDbWRFactories.py @@ -28,9 +28,6 @@ for a database backend. The app_* constants in const.py can be used to indicate which backend is required e.g.: -> # To get the class for the grdb backend -> db_class = GrampsDb.gramps_db_factory(db_type = const.app_gramps) -> > # To get a XML writer > GrampsDb.gramps_db_writer_factory(db_type = const.app_gramps_xml) > diff --git a/src/GrampsDbUtils/__init__.py b/src/GrampsDbUtils/__init__.py index bd5c93495..7d0769b32 100644 --- a/src/GrampsDbUtils/__init__.py +++ b/src/GrampsDbUtils/__init__.py @@ -21,21 +21,18 @@ # $Id$ """ -This package implements the GrampsDb database. It provides a number -of different backends for different storage mechanisms. +This package implements additions to the the GrampsDb database. + +This package should be used for code that extended GrampsDb but also +depends on Gtk. A number of importers and exporters are provided to convert between the different backend formats. -To obtain a class that implements the backend required you should use the -gramps_db_factory method, likewise for writers use the gramps_db_writer_factory +To obtain a class that implements writers use the gramps_db_writer_factory method and for readers use the gramps_db_reader_factory method. For information -on using these factories see the _GrampsDbFactories.py file comments. +on using these factories see the _GrampsDbUtilsFactories.py file comments. -The package also contains GrampsDBCallback which provides signal/slot type -functionality to allow objects to hook into signals that are generated from -the database objects. Read the comments in _GrampsDBCallback.py for more -information. """ diff --git a/src/GrampsLocale/Makefile.am b/src/GrampsLocale/Makefile.am new file mode 100644 index 000000000..eca0bb8a6 --- /dev/null +++ b/src/GrampsLocale/Makefile.am @@ -0,0 +1,26 @@ +# This is the src/GrampsLocale level Makefile for Gramps +# We could use GNU make's ':=' syntax for nice wildcard use, +# but that is not necessarily portable. +# If not using GNU make, then list all .py files individually + +pkgdatadir = $(datadir)/@PACKAGE@/GrampsLocale + +pkgdata_PYTHON = \ + _GrampsLocale.py + __init__.py + + +pkgpyexecdir = @pkgpyexecdir@/GrampsLocale +pkgpythondir = @pkgpythondir@/GrampsLocale + + +dist_pkgdata_DATA = + +# Clean up all the byte-compiled files +MOSTLYCLEANFILES = *pyc *pyo + +GRAMPS_PY_MODPATH = "../" + +pycheck: + (export PYTHONPATH=$(GRAMPS_PY_MODPATH); \ + pychecker $(pkgdata_PYTHON)); diff --git a/src/GrampsLocale/__init__.py b/src/GrampsLocale/__init__.py index 76e579795..471025cf7 100644 --- a/src/GrampsLocale/__init__.py +++ b/src/GrampsLocale/__init__.py @@ -1,2 +1,23 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2004-2006 Donald N. Allingham +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +# $Id: $ from _GrampsLocale import * diff --git a/src/Makefile.am b/src/Makefile.am index 9a3b89b0f..752e3a616 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,6 +8,9 @@ SUBDIRS = \ Filters \ FilterEditor \ GrampsDb \ + GrampsDbUtils \ + BasicUtils \ + GrampsLocale \ Merge \ DisplayTabs \ DisplayModels \