Minor fixes either made directly or found good in dialcentral and brought over
authorepage <eopage@byu.net>
Fri, 27 Mar 2009 00:57:05 +0000 (00:57 +0000)
committerepage <eopage@byu.net>
Fri, 27 Mar 2009 00:57:05 +0000 (00:57 +0000)
git-svn-id: file:///svnroot/ejpi/trunk@24 df6cc7de-23d0-4ae0-bb86-c17aa67b2a9d

Makefile
support/builddeb.py
support/pylint.rc

index 0462e49..3cf2f51 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,52 +1,53 @@
 PROJECT_NAME=ejpi
 SOURCE_PATH=src
-SOURCE=$(shell find $(SOURCE_PATH) -iname *.py)
+SOURCE=$(shell find $(SOURCE_PATH) -iname "*.py")
 PROGRAM=$(SOURCE_PATH)/$(PROJECT_NAME).py
 DATA_TYPES=*.ini *.map *.glade *.png
-DATA=$(foreach type, $(DATA_TYPES), $(shell find $(SOURCE_PATH) -iname $(type)))
+DATA=$(foreach type, $(DATA_TYPES), $(shell find $(SOURCE_PATH) -iname "$(type)"))
 OBJ=$(SOURCE:.py=.pyc)
 BUILD_PATH=./build/
-BUILD_SOURCE=$(foreach file, $(SOURCE), $(BUILD_PATH)/$(subst /,-,$(file)))
 TAG_FILE=~/.ctags/$(PROJECT_NAME).tags
 TODO_FILE=./TODO
 
 DEBUGGER=winpdb
 UNIT_TEST=nosetests --with-doctest -w .
+SYNTAX_TEST=support/test_syntax.py
 STYLE_TEST=../../Python/tools/pep8.py --ignore=W191,E501
 LINT_RC=./support/pylint.rc
 LINT=pylint --rcfile=$(LINT_RC)
-TODO_FINDER=support/todo.py
 PROFILE_GEN=python -m cProfile -o .profile
 PROFILE_VIEW=python -m pstats .profile
+TODO_FINDER=support/todo.py
 CTAGS=ctags-exuberant
 
-.PHONY: all run profile debug test lint tags todo package clean distclean
+.PHONY: all run profile debug test build lint tags todo clean distclean
 
-all: test package
+all: test
 
-run: $(SOURCE)
-       $(SOURCE_PATH)/ejpi_glade.py
+run: $(OBJ)
+       $(SOURCE_PATH)/dc_glade.py
 
-profile: $(SOURCE)
+profile: $(OBJ)
        $(PROFILE_GEN) $(PROGRAM)
        $(PROFILE_VIEW)
 
-debug: $(SOURCE)
+debug: $(OBJ)
        $(DEBUGGER) $(PROGRAM)
 
-test: $(SOURCE)
+test: $(OBJ)
        $(UNIT_TEST)
 
-package:
+build: $(OBJ)
        rm -Rf $(BUILD_PATH)
        mkdir $(BUILD_PATH)
        cp $(SOURCE_PATH)/$(PROJECT_NAME).py  $(BUILD_PATH)
        $(foreach file, $(DATA), cp $(file) $(BUILD_PATH)/$(subst /,-,$(file)) ; )
        $(foreach file, $(SOURCE), cp $(file) $(BUILD_PATH)/$(subst /,-,$(file)) ; )
+       $(foreach file, $(OBJ), cp $(file) $(BUILD_PATH)/$(subst /,-,$(file)) ; )
        cp support/$(PROJECT_NAME).desktop $(BUILD_PATH)
        cp support/builddeb.py $(BUILD_PATH)
 
-lint: $(SOURCE)
+lint: $(OBJ)
        $(foreach file, $(SOURCE), $(LINT) $(file) ; )
 
 tags: $(TAG_FILE) 
@@ -56,6 +57,7 @@ todo: $(TODO_FILE)
 clean:
        rm -Rf $(OBJ)
        rm -Rf $(BUILD_PATH)
+       rm -Rf $(TODO_FILE)
 
 distclean:
        rm -Rf $(OBJ)
@@ -66,13 +68,16 @@ distclean:
        find $(SOURCE_PATH) -name "*.bak" | xargs rm -f
        find $(SOURCE_PATH) -name ".*.swp" | xargs rm -f
 
-$(TAG_FILE): $(SOURCE)
+$(TAG_FILE): $(OBJ)
        mkdir -p $(dir $(TAG_FILE))
        $(CTAGS) -o $(TAG_FILE) $(SOURCE)
 
 $(TODO_FILE): $(SOURCE)
        @- $(TODO_FINDER) $(SOURCE) > $(TODO_FILE)
 
+%.pyc: %.py
+       $(SYNTAX_TEST) $<
+
 #Makefile Debugging
 #Target to print any variable, can be added to the dependencies of any other target
 #Userfule flags for make, -d, -p, -n
index d447d4d..ead57f9 100755 (executable)
@@ -11,7 +11,7 @@ __version__ = "0.9.2"
 __build__ = 0
 __changelog__ = '''\
 0.9.2 - ""
-
+ * Experimenting with faster startup by including pyc files in package
 
 0.9.1 - "Laziness doesn't always pay off"
  * Profiled the code with an especial focus on the pie menus
@@ -65,7 +65,6 @@ if __name__ == "__main__":
        p.mail = __email__
        p.license = "lgpl"
        p.depends = "python2.5, python2.5-gtk2"
-       # p.section = "user/utilities"
        p.section = "user/accessories"
        p.arch = "all"
        p.urgency = "low"
@@ -84,9 +83,9 @@ if __name__ == "__main__":
                        for (oldName, newName) in files
                )
        p["/usr/share/applications/hildon"] = ["ejpi.desktop"]
-       # p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-dialcentral.png|dialcentral.png"]
-       # p["/usr/share/icons/hicolor/64x64/hildon"] = ["64x64-dialcentral.png|dialcentral.png"]
-       # p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-dialcentral.png|dialcentral.png"]
+       # p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-ejpi.png|ejpi.png"]
+       # p["/usr/share/icons/hicolor/64x64/hildon"] = ["64x64-ejpi.png|ejpi.png"]
+       # p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-ejpi.png|ejpi.png"]
 
        print p
        print p.generate(
index 3b73f77..37b9725 100644 (file)
@@ -208,7 +208,7 @@ max-statements=50
 max-parents=7
 
 # Maximum number of attributes for a class (see R0902).
-max-attributes=7
+max-attributes=15
 
 # Minimum number of public methods for a class (see R0903).
 min-public-methods=1