[mousetrap/gnome3-wip: 168/240] in progress



commit 3383a71dda613ad210af7a07573ac2804a292e16
Author: Stoney Jackson <dr stoney gmail com>
Date:   Tue Jun 24 22:15:57 2014 -0400

    in progress

 .gitignore                                      |   26 ++++++-
 AUTHORS                                         |   48 +------------
 ChangeLog                                       |    6 +-
 COPYING => LICENSE                              |    0
 Makefile.am                                     |   51 +------------
 README => README.md                             |   11 +++
 VERSION                                         |    1 +
 autogen.sh                                      |    2 +-
 bin/Makefile.am                                 |   15 ++++
 bin/mt-clean                                    |   23 ++++++-
 bin/mt-gen-AUTHORS                              |    9 ++
 bin/mt-gen-ChangeLog                            |    8 ++
 bin/mt-gen-authors                              |    7 --
 bin/mt-gen-mo                                   |    7 ++
 bin/mt-gen-mousetrap.po                         |   23 ------
 bin/mt-gen-pot                                  |   36 +++++++++
 bin/mt-test                                     |    2 +-
 configure.ac                                    |   91 +++++-----------------
 mousetrap.pot                                   |   64 ++++++++++++++++
 src/Makefile.am                                 |    1 +
 src/mousetrap/Makefile.am                       |   16 ++++
 src/mousetrap/haars/Makefile.am                 |    7 ++
 src/mousetrap/locale/Makefile.am                |    1 +
 src/mousetrap/locale/en/LC_MESSAGES/Makefile    |    8 ++
 src/mousetrap/locale/en/LC_MESSAGES/Makefile.am |   10 +++
 src/mousetrap/locale/en/Makefile.am             |    1 +
 src/mousetrap/plugins/Makefile.am               |    7 ++
 src/mousetrap/tests/Makefile.am                 |    1 +
 src/{ => mousetrap/tests}/run_python_tests.py   |    3 +-
 29 files changed, 279 insertions(+), 206 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index bda8c5f..645597f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,11 @@
 ##############################################################################
-# MouseTrap - MouseTrap specific files here.
+# Placeholders
+#
+# These files exist in the repository as placeholders. But we do not want
+# to commit any changes to these files. So we ignore.
+#
+/ChangeLog
+/AUTHORS
 
 
 ##############################################################################
@@ -49,7 +55,6 @@ coverage.xml
 
 # Translations
 *.mo
-*.pot
 
 # Django stuff:
 *.log
@@ -78,3 +83,20 @@ Makefile.in
 /install-sh
 /missing
 /stamp-h1
+
+
+/config.guess
+/config.h.in
+/config.h.in~
+/config.sub
+/intltool-extract.in
+/intltool-merge.in
+/intltool-update.in
+/ltmain.sh
+/omf.make
+/po/
+/xmldocs.make
+/Makefile
+/config.status
+
+no changes added to commit (use "git add" and/or "git commit -a")
diff --git a/AUTHORS b/AUTHORS
index 0b6cd6f..6eb7be8 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,46 +1,2 @@
-# Generated by bin/mt-gen-authors.sh
-Commits Author
-    53 Flavio Percoco Premoli <flaper87 AT gmail DOT com>
-    45 Stoney Jackson <dr DOT stoney AT gmail DOT com>
-    23 Flavio Percoco <flaper AT src DOT gnome DOT org>
-    11 Logan Hotchkiss <lhotchkiss17 AT gmail DOT com>
-    10 Kevin Brown <kbrown AT rediker DOT com>
-     3 Gil Forcada <gforcada AT gnome DOT org>
-     2 Balázs Úr <urbalazs AT src DOT gnome DOT org>
-     2 Claude Paroz <claude AT 2xlibre DOT net>
-     2 Claude Paroz <claudep AT src DOT gnome DOT org>
-     2 Flamarion Jorge <jorge DOT flamarion AT gmail DOT com>
-     2 Heidi Ellis <heidiellis AT src DOT gnome DOT org>
-     2 Jorge González <jorgegonz AT svn DOT gnome DOT org>
-     2 Kjartan Maraas <kmaraas AT gnome DOT org>
-     2 Mario Blättermann <mariobl AT gnome DOT org>
-     2 Matej Urbančič <mateju AT svn DOT gnome DOT org>
-     2 Roland Murdock <Data AT cs064098 DOT csnet DOT wne DOT edu>
-     1 A S Alam <aalam AT users DOT sf DOT net>
-     1 Amber Heilman <amber DOT l DOT heilman AT gmail DOT com>
-     1 Andika Triwidada <andika AT gmail DOT com>
-     1 Andrej Žnidaršič <andrej DOT znidarsic AT gmail DOT com>
-     1 Aron Xu <aronxu AT gnome DOT org>
-     1 Brendan O'Dowd (hanasu) <bodowd AT worcester DOT edu>
-     1 Carles Ferrando <carles DOT ferrando AT gmail DOT com>
-     1 Chad Wade Day, Jr <cdayjr AT worcester DOT edu>
-     1 Daniel Nylander <dnylande AT src DOT gnome DOT org>
-     1 Fran Dieguez <fran DOT dieguez AT glug DOT es>
-     1 Fran Diéguez <fran DOT dieguez AT mabishu DOT com>
-     1 Gil Forcada Codinachs <gforcada AT src DOT gnome DOT org>
-     1 Joanmarie Diggs <jdiggs AT igalia DOT com>
-     1 Joe Hansen <joedalton2 AT yahoo DOT dk>
-     1 John Carr <johncarr AT src DOT gnome DOT org>
-     1 Joshua Anderson <jsm69 AT wildcats DOT unh DOT edu>
-     1 Kenneth Nielsen <k DOT nielsen81 AT gmail DOT com>
-     1 Lucian Adrian Grijincu <lucian DOT grijincu AT gmail DOT com>
-     1 Mel Argyropoulou <bunnydee93 AT gmail DOT com>
-     1 Og Maciel <ogmaciel AT gnome DOT org>
-     1 Petr Kovar <pknbe AT volny DOT cz>
-     1 Piotr Drąg <piotrdrag AT gmail DOT com>
-     1 Rudolfs Mazurs <rudolfs DOT mazurs AT gmail DOT com>
-     1 Vladimir Melo <vmelo AT gnome DOT org>
-     1 Yaron Shahrabani <sh DOT yaron AT gmail DOT com>
-     1 Yuri Myasoedov <omerta13 AT yandex DOT ru>
-     1 flaper87 <flaper87 AT tartaruga DOT localdomain>
-     1 Мирослав Николић <miroslavnikolic AT rocketmail DOT com>
+# Generated by mt-gen-AUTHORS
+# Do not edit.
diff --git a/ChangeLog b/ChangeLog
index aaf4e72..735f348 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,2 @@
-2009-04-17  Flavio Percoco Premoli  <flaper87 gmail com>
-
-               * *: The ChangeLog is auto-generated when releasing. If you
-               are seeing this, use 'git log' for a detailed list of changes.
+# Generated by mt-gen-ChangeLog
+# Do not edit.
diff --git a/COPYING b/LICENSE
similarity index 100%
rename from COPYING
rename to LICENSE
diff --git a/Makefile.am b/Makefile.am
index 4444049..0f89278 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,50 +1 @@
-SUBDIRS = po docs images
-
-DISTCHECK_CONFIGURE_FLAGS = --enable-pydoc
-
-DISTCLEANFILES =                \
-       intltool-extract        \
-       intltool-merge          \
-       intltool-update         \
-       gnome-doc-utils.make    \
-       mousetrap.desktop
-
-gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
-
-install-data-hook: update-icon-cache
-uninstall-hook: update-icon-cache
-update-icon-cache:
-       @-if test -z "$(DESTDIR)"; then \
-               echo "Updating Gtk icon cache."; \
-               $(gtk_update_icon_cache); \
-       else \
-               echo "*** Icon cache not updated.  After (un)install, run this:"; \
-               echo "***   $(gtk_update_icon_cache)"; \
-       fi
-
-dist-hook:
-               @if test -d "$(srcdir)/.git"; \
-               then \
-                               echo Creating ChangeLog && \
-                               ( cd "$(top_srcdir)" && \
-                                       echo '# Generated by Makefile. Do not edit.'; echo; \
-                                       $(top_srcdir)/missing --run git log --stat ) > ChangeLog.tmp \
-                                       && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
-                                       || ( rm -f ChangeLog.tmp ; \
-                                       echo Failed to generate ChangeLog >&2 ); \
-               else \
-                               echo A git clone is required to generate a ChangeLog >&2; \
-               fi
-
-desktopdir      = $(datadir)/applications
-desktop_in_files = mousetrap.desktop.in
-desktop_DATA     = $(desktop_in_files:.desktop.in=.desktop)
- INTLTOOL_DESKTOP_RULE@
-
-EXTRA_DIST =                \
-       ChangeLog           \
-       MAINTAINERS         \
-       intltool-extract.in \
-       intltool-merge.in   \
-       intltool-update.in
-
+SUBDIRS = bin src
diff --git a/README b/README.md
similarity index 88%
rename from README
rename to README.md
index e2a9062..bab5420 100644
--- a/README
+++ b/README.md
@@ -37,6 +37,17 @@ close your left eye for about 1.5 seconds.
     $ vim ~/.mousetrap.yaml
 
 
+## Translating
+
+1. Generate mousetrap.POT
+    $ cd $MOUSETRAP
+    $ bin/mt-gen-pot
+2. Translate
+3. Place translated `mousetrap.po` in
+`$MOUSETRAP/src/mousetrap/locale/_language_/LC_MESSAGES/mousetrap.po` where
+_language_ is the proper language code
+(https://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html).
+
 ## Writing a Plugin
 
 ### 1. Implement plugin class.
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..8ce8b88
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+1.0.0a
diff --git a/autogen.sh b/autogen.sh
index 078c2ab..5974eb8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -7,7 +7,7 @@ test -z "$srcdir" && srcdir=.
 PKG_NAME="mouseTrap"
 
 (test -f $srcdir/configure.ac \
-  && test -f $srcdir/README \
+  && test -f $srcdir/README.md \
   && test -d $srcdir/src) || {
     echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
     echo " top-level $PKG_NAME directory"
diff --git a/bin/Makefile.am b/bin/Makefile.am
new file mode 100644
index 0000000..3c2ce3f
--- /dev/null
+++ b/bin/Makefile.am
@@ -0,0 +1,15 @@
+EXTRA_DIST = \
+       mt-add-bin-to-path \
+       mt-add-src-to-pythonpath \
+       mt-clean \
+       mt-define-mousetrap-home \
+       mt-gen-AUTHORS \
+       mt-gen-ChangeLog \
+       mt-gen-mo \
+       mt-gen-pot \
+       mt-install \
+       mt-kill-runaway \
+       mt-pylint \
+       mt-run \
+       mt-setup \
+       mt-test
diff --git a/bin/mt-clean b/bin/mt-clean
index 40b3e3d..234a3ae 100755
--- a/bin/mt-clean
+++ b/bin/mt-clean
@@ -1,3 +1,24 @@
 #!/usr/bin/env bash
 source "$(dirname "$0")/mt-define-mousetrap-home"
-(cd "$MOUSETRAP_HOME"; git clean -Xf)
+
+main() {
+    (
+        cd "$MOUSETRAP_HOME"
+        del_ignored
+        if [ "$1" = "-A" ] ; then
+            del_untracked
+        fi
+    )
+}
+
+del_untracked() {
+    git clean -df
+}
+
+del_ignored() {
+    git clean -Xdf
+}
+
+export -f del_ignored del_untracked main
+
+main $@
diff --git a/bin/mt-gen-AUTHORS b/bin/mt-gen-AUTHORS
new file mode 100755
index 0000000..377a998
--- /dev/null
+++ b/bin/mt-gen-AUTHORS
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+(
+    source "$(dirname "$0")/mt-define-mousetrap-home"
+    cd "$MOUSETRAP_HOME"
+    echo "# Generated by `basename $0`" > AUTHORS
+    echo "# Do not edit." >> AUTHORS
+    echo "Commits Author" >> AUTHORS
+    git shortlog -s -e -n | sed 's/@/ AT /g' | sed 's/\./ DOT /g' >> AUTHORS
+    )
diff --git a/bin/mt-gen-ChangeLog b/bin/mt-gen-ChangeLog
new file mode 100755
index 0000000..092c878
--- /dev/null
+++ b/bin/mt-gen-ChangeLog
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+(
+    source "$(dirname "$0")/mt-define-mousetrap-home"
+    cd "$MOUSETRAP_HOME"
+    echo "# Generated by `basename "$0"`" > ChangeLog
+    echo "# Do not edit." >> ChangeLog
+    git log --stat >> ChangeLog
+)
diff --git a/bin/mt-gen-mo b/bin/mt-gen-mo
new file mode 100755
index 0000000..b29a673
--- /dev/null
+++ b/bin/mt-gen-mo
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+source "$(dirname "$0")/mt-define-mousetrap-home"
+
+(
+    cd "$MOUSETRAP_HOME"
+    find . -name "*.po" -exec msgfmt.py "{}" \;
+)
diff --git a/bin/mt-gen-pot b/bin/mt-gen-pot
new file mode 100755
index 0000000..489870b
--- /dev/null
+++ b/bin/mt-gen-pot
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+source "$(dirname "$0")/mt-define-mousetrap-home"
+
+(
+    POT_FILE="$MOUSETRAP_HOME/mousetrap.pot"
+    echo "Generating $POT_FILE"
+    cd "$MOUSETRAP_HOME"
+    VERSION="$(cat VERSION)"
+    xgettext \
+        --language=Python \
+        --keyword=_ \
+        --output="$POT_FILE" \
+        --from-code=UTF-8 \
+        --sort-by-file \
+        --copyright-holder="Flavio Percoco <flaper src gnome org>" \
+        --package-name=mousetrap \
+        --package-version="$VERSION" \
+        --msgid-bugs-address="https://bugzilla.gnome.org/browse.cgi?product=mousetrap"; \
+        --width=90 \
+        `find src -name "*.py" | sort`
+)
+
+(
+    PO_FILE="$MOUSETRAP_HOME/src/mousetrap/locale/en/LC_MESSAGES/mousetrap.po"
+    echo "Generating $PO_FILE"
+    cd "$MOUSETRAP_HOME"
+    VERSION="$(cat VERSION)"
+    xgettext \
+        --language=Python \
+        --keyword=_ \
+        --output="$PO_FILE" \
+        --from-code=UTF-8 \
+        --sort-by-file \
+        --omit-header \
+        `find src -name "*.py" | sort`
+)
diff --git a/bin/mt-test b/bin/mt-test
index d98095e..5c41daf 100755
--- a/bin/mt-test
+++ b/bin/mt-test
@@ -1,4 +1,4 @@
 #!/usr/bin/env bash
 
 source "$(dirname "$0")/mt-define-mousetrap-home"
-"$MOUSETRAP_HOME/src/run_python_tests.py"
+"$MOUSETRAP_HOME/src/mousetrap/tests/run_python_tests.py"
diff --git a/configure.ac b/configure.ac
index e3bf493..ea8441b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,86 +1,37 @@
-AC_INIT(ChangeLog)
+AC_PREREQ([2.69])
 
+AC_INIT([mousetrap],[1.0.0-a],[https://bugzilla.gnome.org/enter_bug.cgi?product=mousetrap])
+AM_INIT_AUTOMAKE([1.13.4 foreign])
 
-CURRENT_DIR=$PWD
-MOUSETRAP_VERSION=0.4
-AM_INIT_AUTOMAKE(mousetrap, $MOUSETRAP_VERSION)
+MOUSETRAP_VERSION=1.0.0-a
 AC_SUBST(MOUSETRAP_VERSION)
-AC_SUBST(CURRENT_DIR)
-
-# libtool versioning
-LT_CURRENT=0
-LT_REVISION=0
-LT_AGE=0
-LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}'
-AC_SUBST(LT_VERSION_INFO)
-AC_SUBST(LT_RELEASE)
-AC_SUBST(LT_CURRENT)
-AC_SUBST(LT_REVISION)
-AC_SUBST(LT_AGE)
-
-dnl Specify a header configuration file
-AM_CONFIG_HEADER(config.h)
-
-dnl Initialize maintainer mode
-AM_MAINTAINER_MODE
 
-dnl Gettext stuff
-
-GETTEXT_PACKAGE=mousetrap
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
-AM_GLIB_GNU_GETTEXT
-
-IT_PROG_INTLTOOL([0.40.0])
+CURRENT_DIR=$PWD
+AC_SUBST(CURRENT_DIR)
 
-dnl Checks for programs
-AC_PROG_CC
 AC_PROG_INSTALL
-AC_ISC_POSIX
 
-dnl Initialize libtool
-AM_DISABLE_STATIC
-AM_PROG_LIBTOOL
+AM_PATH_PYTHON([2.7])
 
-# Check for Python
-
-AM_PATH_PYTHON(2.6)
-
-# Find the headers needed to build extensions
-
-AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(Could not find python headers needed to build Python extensions)])
-
-# Find the modules used by mousetrap
-
-AM_CHECK_PYMOD(gettext,,,[AC_MSG_ERROR(Could not find python module gettext)])
-AM_CHECK_PYMOD(getopt,,,[AC_MSG_ERROR(Could not find python module getopt)])
+AM_CHECK_PYMOD(cv,,,[AC_MSG_ERROR(Could not find python module cv)])
 AM_CHECK_PYMOD(cv2,,,[AC_MSG_ERROR(Could not find python module cv2)])
+AM_CHECK_PYMOD(gi.repository,,,[AC_MSG_ERROR(Could not find python module gi.repository)])
+AM_CHECK_PYMOD(Xlib,,,[AC_MSG_ERROR(Could not find python module Xlib)])
+AM_CHECK_PYMOD(yaml,,,[AC_MSG_ERROR(Could not find python module yaml)])
 
-AM_CONDITIONAL(WITH_LOUIS, test x$have_liblouis = "xyes")
-
-AC_SUBST(mousetrap_LIBS)
-AC_SUBST(mousetrap_CFLAGS)
-
-PYDOC_CHECK()
-DOXYGEN_CHECK()
-DOCBOOK_CHECK()
-
-#mousetrap.spec
-
-AC_OUTPUT([
+AC_CONFIG_FILES([
 Makefile
-mousetrap.desktop
-po/Makefile.in
-docs/Makefile
-docs/man/Makefile
-docs/pydoc/Makefile
-docs/docbook/Makefile
-docs/doxygen/Makefile
-docs/doxygen/Doxyfile
-images/Makefile
 src/Makefile
 src/mousetrap/Makefile
-],[])
+src/mousetrap/plugins/Makefile
+src/mousetrap/tests/Makefile
+src/mousetrap/haars/Makefile
+src/mousetrap/locale/Makefile
+src/mousetrap/locale/en/Makefile
+src/mousetrap/locale/en/LC_MESSAGES/Makefile
+bin/Makefile
+])
+AC_OUTPUT
 
 ###############################################################################
 # Don't include src/mousetrap/app/mousetrap.in in AC_OUTPUT.  It will be
diff --git a/mousetrap.pot b/mousetrap.pot
new file mode 100644
index 0000000..4ae3118
--- /dev/null
+++ b/mousetrap.pot
@@ -0,0 +1,64 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Flavio Percoco <flaper src gnome org>
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: mousetrap 1.0.0a\n"
+"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/browse.cgi?product=mousetrap\n";
+"POT-Creation-Date: 2014-06-25 16:28-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL ADDRESS>\n"
+"Language-Team: LANGUAGE <LL li org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/mousetrap/gui.py:79
+#, python-format
+msgid "Moving pointer to %s"
+msgstr ""
+
+#: src/mousetrap/gui.py:84
+msgid "Not moving the pointer"
+msgstr ""
+
+#: src/mousetrap/main.py:52
+#, python-format
+msgid "Could not import plugin `%s`. Check config file and PYTHONPATH."
+msgstr ""
+
+#: src/mousetrap/plugins/eyes.py:90
+msgid "Found the face"
+msgstr ""
+
+#: src/mousetrap/plugins/eyes.py:97
+#, python-format
+msgid "Found the left eye at %s"
+msgstr ""
+
+#: src/mousetrap/plugins/eyes.py:104
+#, python-format
+msgid "Found an open eye at %s"
+msgstr ""
+
+#: src/mousetrap/plugins/interface.py:8 src/mousetrap/plugins/interface.py:12
+msgid "Must implement."
+msgstr ""
+
+#: src/mousetrap/vision.py:12
+#, python-format
+msgid "Device #%d does not support video capture interface"
+msgstr ""
+
+#: src/mousetrap/vision.py:13
+msgid "Error while capturing. Camera disconnected?"
+msgstr ""
+
+#: src/mousetrap/vision.py:125
+#, python-format
+msgid "Feature not detected: %s"
+msgstr ""
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..c1e0520
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = mousetrap
diff --git a/src/mousetrap/Makefile.am b/src/mousetrap/Makefile.am
new file mode 100644
index 0000000..69d22b7
--- /dev/null
+++ b/src/mousetrap/Makefile.am
@@ -0,0 +1,16 @@
+SUBDIRS = \
+       haars \
+       locale \
+       plugins \
+       tests
+
+pkgpython_PYTHON = \
+       config.py \
+       gui.py \
+       i18n.py \
+       image.py \
+       __init__.py \
+       main.py \
+       Makefile.am \
+       mousetrap.yaml \
+       vision.py
diff --git a/src/mousetrap/haars/Makefile.am b/src/mousetrap/haars/Makefile.am
new file mode 100644
index 0000000..6b1272c
--- /dev/null
+++ b/src/mousetrap/haars/Makefile.am
@@ -0,0 +1,7 @@
+pkgpython_DATA = \
+       haarcascade_eye.xml \
+       haarcascade_frontalface_default.xml \
+       haarcascade_mcs_lefteye.xml \
+       haarcascade_mcs_nose.xml \
+       haarcascade_mcs_righteye.xml \
+       Makefile.am
diff --git a/src/mousetrap/locale/Makefile.am b/src/mousetrap/locale/Makefile.am
new file mode 100644
index 0000000..81fee21
--- /dev/null
+++ b/src/mousetrap/locale/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = en
diff --git a/src/mousetrap/locale/en/LC_MESSAGES/Makefile b/src/mousetrap/locale/en/LC_MESSAGES/Makefile
new file mode 100644
index 0000000..988d30d
--- /dev/null
+++ b/src/mousetrap/locale/en/LC_MESSAGES/Makefile
@@ -0,0 +1,8 @@
+PO_FILES = mousetrap.po
+
+MO_FILES = $(PO_FILES:.po=.mo)
+
+$(MO_FILES): %.mo: %.po
+       msgfmt.py -o $@ $<
+
+all: $(MO_FILES)
diff --git a/src/mousetrap/locale/en/LC_MESSAGES/Makefile.am b/src/mousetrap/locale/en/LC_MESSAGES/Makefile.am
new file mode 100644
index 0000000..9d85ca7
--- /dev/null
+++ b/src/mousetrap/locale/en/LC_MESSAGES/Makefile.am
@@ -0,0 +1,10 @@
+SUBDIRS = LC_MESSAGES
+
+PO_FILES = mousetrap.po
+
+MO_FILES = $(PO_FILES:.po=.mo)
+
+$(MO_FILES): %.mo: %.po
+       msgfmt.py -o $@ $<
+
+all: $(MO_FILES)
diff --git a/src/mousetrap/locale/en/Makefile.am b/src/mousetrap/locale/en/Makefile.am
new file mode 100644
index 0000000..77e308c
--- /dev/null
+++ b/src/mousetrap/locale/en/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = LC_MESSAGES
diff --git a/src/mousetrap/plugins/Makefile.am b/src/mousetrap/plugins/Makefile.am
new file mode 100644
index 0000000..775783b
--- /dev/null
+++ b/src/mousetrap/plugins/Makefile.am
@@ -0,0 +1,7 @@
+pkgpython_PYTHON = \
+       camera.py \
+       display.py \
+       eyes.py \
+       __init__.py \
+       interface.py \
+       nose.py
diff --git a/src/mousetrap/tests/Makefile.am b/src/mousetrap/tests/Makefile.am
new file mode 100644
index 0000000..c1e0520
--- /dev/null
+++ b/src/mousetrap/tests/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = mousetrap
diff --git a/src/run_python_tests.py b/src/mousetrap/tests/run_python_tests.py
similarity index 88%
rename from src/run_python_tests.py
rename to src/mousetrap/tests/run_python_tests.py
index db16840..c0963c2 100755
--- a/src/run_python_tests.py
+++ b/src/mousetrap/tests/run_python_tests.py
@@ -15,6 +15,7 @@ def initialize_import_path():
     paths = [
         get_source_directory()
     ]
+    print "appending " + str(paths)
     append_to_path(paths)
 
 
@@ -24,7 +25,7 @@ def append_to_path(paths):
 
 
 def get_source_directory():
-    return abspath(dirname(__file__))
+    return abspath(dirname(__file__) + '/../..')
 
 
 def load_tests():


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]