moap-0.2.7/0000777000076400007640000000000011220504670007466 500000000000000moap-0.2.7/aclocal.m40000664000076400007640000005426411220504522011253 00000000000000# generated automatically by aclocal 1.10.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/as-python.m4]) m4_include([m4/as-version.m4]) moap-0.2.7/moap.spec.in0000664000076400007640000000307010656424633011635 00000000000000%define pyver %(%{__python} -c "import sys; print sys.version[:3]") Name: moap Version: @PACKAGE_VERSION@ Release: @PACKAGE_VERSION_RELEASE@%{?dist} Summary: Swiss army knife for project maintainers and developers Source: %{name}-%{version}.tar.bz2 URL: http://thomas.apestaart.org/moap/trac/ License: GPL Group: Applications/Archiving BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %description MOAP is a swiss army knife for project maintainers and developers. It aims to help in keeping you in the flow of maintaining, developing and releasing, automating whatever tasks can be automated. It allows you to parse DOAP files and submit releases, send release mails, create iCal files and RSS feeds, maintain version control ignore lists, check in based on the latest ChangeLog entry, and more. %prep %setup -q %configure --sysconfdir=%{_sysconfdir} %build %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README moap.doap NEWS RELEASE ChangeLog %{_bindir}/moap %{_mandir}/man1/moap.1* %{_libdir}/python*.*/site-packages/moap %{_sysconfdir}/bash_completion.d/moap %changelog * Mon Aug 06 2007 Thomas Vander Stichele - added man page * Sat Feb 03 2007 Thomas Vander Stichele - added bash completion file - use DESTDIR install * Sat Sep 16 2006 Thomas Vander Stichele - initial package moap-0.2.7/RELEASE0000664000076400007640000000365111220504435010413 00000000000000This is MOAP 0.2.7, "MMM...". Coverage in 0.2.7: 1424 / 1899 (74 %), 109 python tests, 2 bash tests Features added since 0.2.6: - Added moap vcs backup, a command to backup a checkout to a tarball that can be used later to reconstruct the checkout. Implemented for svn. - Fixes for git-svn, git, svn and darcs. - Fixes for Python 2.3 and Python 2.6 Bugs fixed since 0.2.6: - 263: broken changelog unit test - 267: a man page - 270: cl find completely busted - 275: cl prepare --ctags failure with exuberant ctags 5.7 - 257: ImportError: No module named moap.util - 258: git-svn support - 259: bzr diff patch - 266: svn:ignore property not well parsed - 273: DEP: RDF, Fedora release 7 (Moonshine) - 277: "changelog prepare" doesn't list changed functions in C++ files. - 281: changelog prepare -c crashes with "not a ctags line" - 282: make install fails - 284: not full change detected on svn move file - 286: [svn] propedit on externals is not recognized as a change - 239: warn if ChangeLog has not been saved - 260: Add changelog grep command - 261: Option to make 'changelog diff' include differences in ChangeLog file - 262: changelog find: fix for multiple search terms - 264: Make changelog find case insensitive by default - 265: git diff should show staged changes - 271: trailing spaces in date/name/address line for entry break parsing Contributors to this release: - Arek Korbik - Jelmer Vernooij - Jonny Lamb - Rob Cakebread - Thomas Vander Stichele WHAT IT IS ---------- MOAP is a swiss army knife for project maintainers and developers. It aims to help in keeping you in the flow of maintaining, developing and releasing, automating whatever tasks can be automated. It allows you to parse DOAP files and submit releases, send release mails, create iCal files and RSS feeds, maintain version control ignore lists, check in based on the latest ChangeLog entry, and more. For more information, see http://thomas.apestaart.org/moap/trac/ moap-0.2.7/doc/0000777000076400007640000000000011220504670010233 500000000000000moap-0.2.7/doc/moap.rss20000664000076400007640000001162211220504532011717 00000000000000 Release feed for MOAP Release feed for MOAP http://thomas.apestaart.org/moap/trac/ en MOAP 0.2.7 'MMM...' released release-moap-0.2.7 http://thomas.apestaart.org/moap/trac/ Wed, 24 Jun 2009 00:00:00 +0000 Added moap vcs backup, a command to backup a checkout to a tarball that can be used later to reconstruct the checkout. Implemented for svn. Fixes for git-svn, git, svn and darcs. Fixes for Python 2.3 and Python 2.6 For more information, visit <A HREF="http://thomas.apestaart.org/moap/trac/">the project homepage</A> MOAP 0.2.6 'Nerd Night' released release-moap-0.2.6 http://thomas.apestaart.org/moap/trac/ Fri, 23 May 2008 00:00:00 +0000 Added support for git-svn. Fix brz diff. Added moap changelog find to search through a ChangeLog. Added man page. Added moap tracadmin to administrate trac installations. Added changed properties/added/deleted files when preparing ChangeLog entries. Added checking of unchanged ChangeLog entry template. For more information, visit <A HREF="http://thomas.apestaart.org/moap/trac/">the project homepage</A> MOAP 0.2.5 'Matonge' released release-moap-0.2.5 http://thomas.apestaart.org/moap/trac/ Sun, 24 Jun 2007 00:00:00 +0000 Added support for dc:description in .doap files to list the release's features. Added bugzilla implementation for moap bug and moap doap bug. Added better support for detecting exuberant ctags. Added support for filing bugs for missing dependencies/distros. Added Bazaar and Git backend for version control system features. Added "moap changelog contributors" to get a list of contributors to a release. Changed default behaviour for "moap changelog prepare" to not extract tags. Added -c, --ctags option to "moap changelog prepare" to extract tags. Added "help" command to "moap" and all its subcommands. For more information, visit <A HREF="http://thomas.apestaart.org/moap/trac/">the project homepage</A> MOAP 0.2.4 'Pacito' released release-moap-0.2.4 http://thomas.apestaart.org/moap/trac/ Sun, 20 May 2007 00:00:00 +0000 Added RSS 2.0 feed generation from .doap release entries using Genshi or Cheetah templates. Added support for CHANGE_LOG_EMAIL_ADDRESS environment variable to moap changelog prepare. Added parsing of wiki attribute of a .DOAP project. Implemented "moap doap search" to search Google or Yahoo for your project's home page. Added support for multiple doap files to "moap doap" Added code to check the user's distribution and offer hints on how to install dependencies. For more information, visit <A HREF="http://thomas.apestaart.org/moap/trac/">the project homepage</A> MOAP 0.2.3 'Ketnet' released release-moap-0.2.3 http://thomas.apestaart.org/moap/trac/ Tue, 17 Apr 2007 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/moap/trac/">the project homepage</A> MOAP 0.2.2 'Airlines' released release-moap-0.2.2 http://thomas.apestaart.org/moap/trac/ Sun, 25 Mar 2007 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/moap/trac/">the project homepage</A> MOAP 0.2.1 'Ambulance' released release-moap-0.2.1 http://thomas.apestaart.org/moap/trac/ Sun, 04 Feb 2007 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/moap/trac/">the project homepage</A> MOAP 0.2.0 'Waffle Flop' released release-moap-0.2.0 http://thomas.apestaart.org/moap/trac/ Sun, 17 Dec 2006 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/moap/trac/">the project homepage</A> moap-0.2.7/doc/Makefile.in0000664000076400007640000002541711220504524012225 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = moap.rss2 moap.ics $(man_MANS) man_MANS = man/moap.1 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $$i; then file=$$i; \ else file=$(srcdir)/$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) all-local installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-man1 install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-local distclean distclean-generic distdir dvi dvi-am \ html html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-man \ uninstall-man1 all-local: feeds reference @HAVE_EPYDOC_TRUE@reference: $(top_srcdir)/moap/*.py feeds @HAVE_EPYDOC_TRUE@ epydoc -o reference $(top_srcdir)/moap @HAVE_EPYDOC_FALSE@reference: @HAVE_EPYDOC_FALSE@ @true # generate feeds feeds: moap.rss2 moap.ics # don't fail fatally if user does not have RDF moap.rss2: $(top_srcdir)/moap.doap $(top_srcdir)/moap/doap/rss.py -PYTHONPATH=$(top_srcdir) $(top_builddir)/bin/moap doap -f $(top_srcdir)/moap.doap rss > moap.rss2 moap.ics: $(top_srcdir)/moap.doap $(top_srcdir)/moap/doap/rss.py -PYTHONPATH=$(top_srcdir) $(top_builddir)/bin/moap doap -f $(top_srcdir)/moap.doap ical > moap.ics clean-local: @rm -rf reference # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/doc/man/0000777000076400007640000000000011220504670011006 500000000000000moap-0.2.7/doc/man/moap.10000664000076400007640000000217110656424633011757 00000000000000.TH "moap" 1 .SH NAME moap \- Moap helps you maintain projects. .SH SYNOPSIS .B moap [command] [options...] .SH DESCRIPTION moap is a swiss army knife for project maintainers and developers. It aims to help in keeping you in the flow of maintaining, developing and releasing, automating whatever tasks can be automated. This includes: - updating and committing from ChangeLog files (much like prepare-ChangeLog.pl) - maintaining your checkout's ignore list - submitting releases to Freshmeat - sending out release mails (with support for templating) - creating iCal/RSS feeds for your releases (based on a doap file, and with support for templating), and more. .SH COMMANDS .TP .B \- bug Interact with bug tracker .TP .B \- changelog Act on ChangeLog file .TP .B \- code Do things to the code .TP .B \- doap Read and act on DOAP file .TP .B \- ignore Update VCS ignore list .SH OPTIONS .TP .B \--h, --help Show help .TP .B \--v, --version Show version information .SH AUTHORS Thomas Vander Stichele (thomas at apestaart dot org) Man page written to conform with Debian by Marc-Andre Lureau. moap-0.2.7/doc/Makefile.am0000664000076400007640000000124610775171221012216 00000000000000EXTRA_DIST = moap.rss2 moap.ics $(man_MANS) all-local: feeds reference if HAVE_EPYDOC reference: $(top_srcdir)/moap/*.py feeds epydoc -o reference $(top_srcdir)/moap else reference: @true endif # generate feeds feeds: moap.rss2 moap.ics # don't fail fatally if user does not have RDF moap.rss2: $(top_srcdir)/moap.doap $(top_srcdir)/moap/doap/rss.py -PYTHONPATH=$(top_srcdir) $(top_builddir)/bin/moap doap -f $(top_srcdir)/moap.doap rss > moap.rss2 moap.ics: $(top_srcdir)/moap.doap $(top_srcdir)/moap/doap/rss.py -PYTHONPATH=$(top_srcdir) $(top_builddir)/bin/moap doap -f $(top_srcdir)/moap.doap ical > moap.ics man_MANS = man/moap.1 clean-local: @rm -rf reference moap-0.2.7/doc/moap.ics0000664000076400007640000000267411220504532011613 00000000000000BEGIN:VCALENDAR PRODID:-//thomas.apestaart.org//moap//EN VERSION:2.0 BEGIN:VEVENT SUMMARY:MOAP 0.2.0 'Waffle Flop' released UID:2006-12-17-moap-0.2.0@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20061217 DTEND;VALUE=DATE:20061217 END:VEVENT BEGIN:VEVENT SUMMARY:MOAP 0.2.1 'Ambulance' released UID:2007-02-04-moap-0.2.1@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20070204 DTEND;VALUE=DATE:20070204 END:VEVENT BEGIN:VEVENT SUMMARY:MOAP 0.2.2 'Airlines' released UID:2007-03-25-moap-0.2.2@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20070325 DTEND;VALUE=DATE:20070325 END:VEVENT BEGIN:VEVENT SUMMARY:MOAP 0.2.3 'Ketnet' released UID:2007-04-17-moap-0.2.3@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20070417 DTEND;VALUE=DATE:20070417 END:VEVENT BEGIN:VEVENT SUMMARY:MOAP 0.2.4 'Pacito' released UID:2007-05-20-moap-0.2.4@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20070520 DTEND;VALUE=DATE:20070520 END:VEVENT BEGIN:VEVENT SUMMARY:MOAP 0.2.5 'Matonge' released UID:2007-06-24-moap-0.2.5@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20070624 DTEND;VALUE=DATE:20070624 END:VEVENT BEGIN:VEVENT SUMMARY:MOAP 0.2.6 'Nerd Night' released UID:2008-05-23-moap-0.2.6@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20080523 DTEND;VALUE=DATE:20080523 END:VEVENT BEGIN:VEVENT SUMMARY:MOAP 0.2.7 'MMM...' released UID:2009-06-24-moap-0.2.7@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20090624 DTEND;VALUE=DATE:20090624 END:VEVENT END:VCALENDAR moap-0.2.7/ChangeLog0000644000076400007640000017372011220504517011166 00000000000000=== release 0.2.7 === 2009-06-24 Thomas Vander Stichele * NEWS: * README: * RELEASE: * configure.ac: * moap.doap: Releasing moap 0.2.7, "MMM..." 2009-06-24 Thomas Vander Stichele * misc/moap-uninstalled: Make bashrc script with a better name 2009-06-24 Thomas Vander Stichele * moap/util/mail.py: Make email module work on python 2.3 2009-06-24 Thomas Vander Stichele * moap/vcs/vcs.py: Fix archiving to .bz2. 2009-06-24 Thomas Vander Stichele * moap/test/test_vcs_svn.py: * moap/vcs/vcs.py: Fix for Python 2.3 by avoiding extractall, and working around a hardlinking bug in tarfile in python 2.3 2009-06-24 Thomas Vander Stichele * moap/test/common.py: * moap/test/test_bug_bugzilla.py: * moap/test/test_commands_doap.py: * moap/test/test_commands_tracadmin.py: * moap/test/test_doap_doap.py: * moap/test/test_util_ctags.py: * moap/test/test_util_distro.py: * moap/test/test_util_mail.py: * moap/test/test_util_usermap.py: * moap/test/test_util_util.py: * moap/test/test_vcs_bzr.py: * moap/test/test_vcs_cvs.py: * moap/test/test_vcs_darcs.py: * moap/test/test_vcs_git.py: Make all tests do from moap.test import common Make all TestCases subclass from common.TestCase when logging setUp/tearDown, handle twisted 1.3.0 too for 2.3 compat 2009-06-24 Thomas Vander Stichele * moap/test/test_util_mail.py: * moap/util/mail.py: Migrate to using email because MimeWriter is deprecated. Slightly change the test since the message gets encoded differently, with plain text being included as 7 bit text. 2009-06-24 Thomas Vander Stichele * moap/vcs/svn.py: My svn (1.6.1) seems to have changed from using Name: to Added: when listing new svn properties. 2009-06-24 Thomas Vander Stichele * moap/test/Makefile.am: * moap/test/test_util_mail.py (added): Add a test for moap.utilmail before rewriting it to deal with 2.6 deprecating MimeWriter. 2009-06-24 Thomas Vander Stichele * moap/test/test_vcs_git_svn.py: Another place where git-svn can be installed. 2009-06-23 Thomas Vander Stichele * moap/test/test_vcs_darcs.py: * moap/vcs/darcs.py: Apparently inventory is gone now, so remove it. 2009-06-16 Thomas Vander Stichele * moap/vcs/svn.py: Remove 'format' from detection code since it's not there in my F11 flumotion-0.4 branch. 2009-04-25 Thomas Vander Stichele * moap/command/cl.py: Add another TypeError. See https://thomas.apestaart.org/moap/trac/ticket/403 2009-04-25 Thomas Vander Stichele * moap/command/cl.py: Add a TypeError when a ChangeLog entry doesn't match either a change or a release entry. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520997 2009-04-25 Thomas Vander Stichele * moap/command/doap.py: Allow overriding the project name on moap doap freshmeat, because freshmeat does not allow dashes in project names. Fixes #300. 2009-04-25 Thomas Vander Stichele patch by: Jelmer Vernooij * moap/doap/doap.py: Make shortname for Project optional in doap files. Fixes #298. 2009-04-25 Thomas Vander Stichele * moap/command/cl.py: Add -q option to ctags, which includes extra class-qualified tag entry for each tag which is a member of a class. Should address #283. 2009-04-25 Thomas Vander Stichele * moap/vcs/git.py: When updating, git behaves differently between git pull (base path) and cd (base path); git pull So use the latter. Fixes #302. 2009-04-14 Thomas Vander Stichele * moap/vcs/svn.py: Log the command that will be executed to commit. This shows that we commit too much; see #402. 2009-03-05 Thomas Vander Stichele * moap/command/cl.py: * moap/test/test_commands_cl.py: moap cl diff should only show files once even if they're mentioned multiple times. Fixes #303. 2009-03-05 Thomas Vander Stichele patch by: Arek Korbik * moap/test/test_vcs_bzr.py: * moap/test/test_vcs_git.py: * moap/vcs/bzr.py: * moap/vcs/git.py: Fix for quotes in commit messages. Fixes #280. 2009-03-05 Thomas Vander Stichele modified patch by: Jonny Lamb * moap/test/test_vcs_git_svn.py: * moap/vcs/git_svn.py: git 1.6 does not have /usr/bin/git-svn, so detect in a different way. Patch from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=517551. Fixes #399. 2008-10-01 Thomas Vander Stichele * moap/command/ignore.py: Adapt to getUnknown() change. Fixes #304. 2008-09-01 Thomas Vander Stichele * moap/command/bug.py: * moap/command/cl.py: * moap/command/doap.py: * moap/command/ignore.py: * moap/command/tracadmin.py: Adapt to new Command .usage use, making it simpler. 2008-08-30 Thomas Vander Stichele * moap/extern/command/command.py: Strip leading/trailing whitespace from description, which can be in """ """ blocks. 2008-08-27 Thomas Vander Stichele patch by: Jelmer Vernooij * moap/command/bug.py: Don't fail when moap bug is run without a .doap file present. Fixes #295 and http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=496534 2008-08-01 Thomas Vander Stichele * moap/command/cl.py: Add newline. 2008-07-15 Thomas Vander Stichele * moap/vcs/vcs.py: Unify getAdded/getDeleted/getIgnored/getUnknown. They now all take path as an argument. getNotIgnored was removed. * moap/command/ignore.py: * moap/test/test_vcs_bzr.py: * moap/test/test_vcs_cvs.py: * moap/test/test_vcs_darcs.py: * moap/test/test_vcs_git.py: * moap/test/test_vcs_git_svn.py: * moap/test/test_vcs_svn.py: * moap/vcs/bzr.py: * moap/vcs/cvs.py: * moap/vcs/darcs.py: * moap/vcs/git.py: * moap/vcs/git_svn.py: * moap/vcs/svn.py: Follow up on that change. 2008-07-12 Thomas Vander Stichele * COPYING (added): add GPLv2+ 2008-07-10 Thomas Vander Stichele * moap/test/test_vcs_svn.py: add test for the svn implementation. * moap/vcs/vcs.py: add backup and restore methods, as well as getCheckoutCommand vmethod and diffCheckout method. Add an exception. * moap/vcs/svn.py: Implement getCheckoutCommand. * moap/test/test_bash_completion.sh: * moap/main.py: * moap/command/Makefile.am: * moap/command/vcs.py (added): Add a moap vcs command, and implement backup. 2008-07-10 Thomas Vander Stichele * moap/command/cl.py: added/deleted paths are supposed to be relative. 2008-07-10 Thomas Vander Stichele * moap/vcs/svn.py: Make added/deleted paths relative. Implement getIgnored. Make all four status methods use same _getByStatus. * moap/test/test_vcs_svn.py: Fix test for this. 2008-07-10 Thomas Vander Stichele * moap/test/test_vcs_svn.py: Rename a test, add a new one. * moap/vcs/vcs.py: Doc updates. Add getIgnored vmethod. 2008-07-10 Thomas Vander Stichele * doc/logo/moap.32x32.ico (added): Add .ico. 2008-05-31 Thomas Vander Stichele modified patch by: Rob Cakebread * moap.doap: Fix up SVNRepository contents. Fixes #289. 2008-05-23 Thomas Vander Stichele * moap/util/deps.py: Add python-yahoo dependency for Debian. Fixes #288. 2008-05-23 Thomas Vander Stichele * configure.ac: Back to TRUNK. * doc/release: Add some notes === release 0.2.6 === 2008-05-23 Thomas Vander Stichele * NEWS: * README: * RELEASE: * configure.ac: * doc/release: * moap.doap: Releasing 0.2.6, "Nerd Night" 2008-05-23 Thomas Vander Stichele * moap/util/command.py: * moap/util/util.py: Implement .debug to chain up correctly to Log class. 2008-05-23 Thomas Vander Stichele * moap/vcs/vcs.py: Add getAdded() and getDeleted() methods. Need to be implemented by other subclasses too. * moap/vcs/svn.py: * moap/test/test_vcs_svn.py: Implement and test. * moap/command/cl.py: Handle additions and deletions. Fixes #284. 2008-05-23 Thomas Vander Stichele patch by: Marc-Andre Lureau * moap/test/test_vcs_git_svn.py: * moap/vcs/git.py: Only show staged changes in diff. Fixes #265. 2008-05-23 Thomas Vander Stichele modified patch by: Marc-Andre Lureau * moap/command/cl.py: Change ChangeLog semantics by adding a .parse() method. Detect when the default ChangeLog entry has not been changed, and warn about it. * moap/test/ChangeLog/ChangeLog.notedited: * moap/test/test_commands_cl.py: * moap/test/Makefile.am: Add a test. Fixes #239. 2008-05-23 Thomas Vander Stichele * moap/util/ctags.py: Handle ignoring null tag warnings from exuberant ctags. Fixes #275. 2008-05-23 Thomas Vander Stichele modified patch by: Tim Philipp-Müller * moap/test/Makefile.am: * moap/test/ChangeLog/ChangeLog.gst-plugins-base.271: * moap/test/test_commands_cl.py: Add a test for trailing whitespace in the date/name/address line. * moap/command/cl.py: Fix parsing when there's trailing whitespace. Fixes #271. 2008-05-23 Thomas Vander Stichele * moap/vcs/vcs.py: Change getPropertyChanges() to return a dict of path -> properties * moap/test/test_vcs_svn.py: * moap/vcs/svn.py: Implement and test it for svn. * moap/command/cl.py: Use it to list the actual properties changed. 2008-05-22 Thomas Vander Stichele * moap/vcs/vcs.py: Add getPropertyChanges() to get paths that have changed properties. * moap/test/test_vcs_svn.py: * moap/vcs/svn.py: Implement it for svn. * moap/command/cl.py: Use it in moap cl prep so that we allow commenting on property changes. Fixes #286. 2008-05-22 Thomas Vander Stichele * moap/vcs/vcs.py: Empty lines should be allowed. 2008-05-22 Thomas Vander Stichele * moap/test/test_vcs_git_svn.py: Check for git-svn in a way that doesn't error out. 2008-03-31 Thomas Vander Stichele * moap/test/test_util_ctags.py: * moap/util/ctags.py: Allow spaces in the first column of a ctags file. Fixes #281. 2007-09-23 Thomas Vander Stichele * doc/Makefile.am: Don't build reference without epydoc. Double-fixes #273. 2007-09-22 Thomas Vander Stichele * moap/vcs/svn.py: Use non-greedy matching when scrubbing properties, otherwise nothing below the property line gets let through. * moap/vcs/vcs.py: Some more logging. * moap/test/diff/svn_symlink.diff: * moap/test/test_vcs_svn.py: Add to test case for this bug. 2007-09-22 Thomas Vander Stichele * moap/vcs/svn.py: Factor out scrubPropertyChanges so we can use it in tests too. * moap/test/diff/svn_symlink.diff: * moap/test/test_vcs_svn.py: Add test for a diff on a symlink. 2007-09-22 Thomas Vander Stichele * doc/Makefile.am: Don't fail fatally if user does not have RDF. Fixes #273. 2007-09-04 Thomas Vander Stichele * moap/test/test_bash_completion.sh: Fix test. 2007-09-04 Thomas Vander Stichele * moap/extern/command/command.py: * moap/test/Makefile.am: * moap/test/test_commands_tracadmin.py: * moap/test/trac/db.dump: Add a test for the tracadmin list/rename functionality. Coverage: 75 % (1183 / 1570) 2007-09-03 Thomas Vander Stichele * moap/test/Makefile.am: * moap/test/test_util_usermap.py: * moap/util/Makefile.am: * moap/util/usermap.py: Add a UserMap class that maps old to new usernames. * moap/command/tracadmin.py: Use it to allow specifying a file of username mappings. 2007-08-31 Thomas Vander Stichele * moap/command/tracadmin.py: Import trac only where needed. 2007-08-24 Thomas Vander Stichele * moap/command/tracadmin.py: Fix up summaries and descriptions. * moap/util/deps.py: Add a way to install trac. 2007-08-23 Thomas Vander Stichele * moap/command/tracadmin.py: Add a warning for fields that look multiple but shouldn't be. 2007-08-23 Thomas Vander Stichele * moap/command/Makefile.am: * moap/command/tracadmin.py: * moap/main.py: Add a moap tracadmin subcommand, and implement moap tracadmin user list/rename 2007-08-13 Thomas Vander Stichele * moap/command/cl.py: Skip ChangeEntry keys that might be set to None. Fixes #270. * moap/test/test_commands_cl.py: Add test from ticket #270. 2007-08-08 Thomas Vander Stichele * moap/vcs/svn.py: Always get svn diff output in C locale. Fixes #266. 2007-08-08 Thomas Vander Stichele * moap/command/cl.py: * moap/test/test_commands_cl.py: Refactor Entry class to have a .match method and move logic there. Also look for name/date/address in ChangeEntry instances. Simplify logic in ChangeLogFile.find() Fixes #260. 2007-08-08 Thomas Vander Stichele modified patch by: Tim Philipp-Müller * moap/command/cl.py: * moap/test/test_commands_cl.py: Make moap changelog find case-insensitive by default, with a -c/--case-sensitive option to change that behaviour. Closes #264. 2007-08-06 Thomas Vander Stichele patch by: Marc-Andre Lureau * doc/Makefile.am: * doc/man/moap.1: * moap.spec.in: Add a man page. Fixes #267. 2007-08-06 Thomas Vander Stichele * Makefile.am: * configure.ac: * doc/Makefile.am: Add doc/Makefile.am and friends. Move stuff to subdirs. 2007-07-31 Thomas Vander Stichele patch by: Tim Philipp-Müller * moap/test/test_commands_cl.py: Fix test for people other than me. Fixes #263. 2007-07-31 Thomas Vander Stichele * moap/test/test_commands_cl.py: Make sure the test also works on days that aren't 2007-07-30. 2007-07-30 Thomas Vander Stichele * moap/command/cl.py: * moap/test/test_commands_cl.py: Output the ChangeLog entry before the diff. This should help people write better ChangeLog entries because they see it before committing. Can be disabled with the -E option. Fixes #261. 2007-07-30 Thomas Vander Stichele * moap/command/cl.py: Don't output new lines for files that don't have a diff. Output new line for files that do. 2007-07-30 Thomas Vander Stichele patch by: Tim Philipp-Müller * moap/command/cl.py: * moap/test/test_commands_cl.py: Make moap changelog find take and'd arguments. Fixes #262. 2007-07-30 Thomas Vander Stichele * moap/command/cl.py: Add "find" subcommand. Fixes #260. Add "-C" parameter to changelog command to specify a path to the ChangeLog file/directory. Depecrate specifying this path as an argument to all commands but checkin and prepare (so aliases like mcc and mcp still work). * moap/test/test_commands_cl.py: Rework tests for specifying ChangeLog path. Use .parse instead of .do Add two tests for find. 2007-07-30 Thomas Vander Stichele patch by: Arek Korbik * moap/vcs/bzr.py (Bzr.diff): Make bzr diff work by using bzr diff (path) instead of doing os.chdir(path) (where path could be a directory). Fixes #259. * moap/test/test_vcs_bzr.py: Make bzr diff tests actually test something. 2007-07-19 Thomas Vander Stichele * moap/test/test_commands_doap.py: Don't fail when Cheetah is missing. 2007-07-18 Thomas Vander Stichele patch by: Marc-Andre Lureau * moap/vcs/Makefile.am: * moap/vcs/git_svn.py: * moap/test/Makefile.am: * moap/test/test_vcs_git_svn.py: Add git-svn support. 2007-07-18 Thomas Vander Stichele patch by: Marc-Andre Lureau * moap/vcs/git.py (detect, Git.ignore, Git.commit, Git.diff): Fixes git commit. 2007-07-18 Thomas Vander Stichele patch by: Marc-Andre Lureau * Makefile.am: Fix doc directory 'distclean' * moap/command/cl.py (Diff.do): Check if latest ChangeLog entry is not a ReleaseEntry when preparing it. 2007-07-13 Thomas Vander Stichele * bin/moap: Use /usr/bin/env to find python. Again fixes #257. 2007-07-13 Thomas Vander Stichele * bin/moap: Verify first that we can import moap. If not, the install is broken. Fixes #257. === release 0.2.5 === 2007-06-24 Thomas Vander Stichele * NEWS: * README: * configure.ac: * doc/release: * moap.doap: Releasing 0.2.5, "Matonge" 2007-06-24 Thomas Vander Stichele * README: * doc/moap.rss2: * moap.spec.in: * moap/util/deps.py: * moap/util/distro.py: Further https -> http updates 2007-06-24 Thomas Vander Stichele * moap/test/test_vcs_bzr.py: * moap/test/test_vcs_cvs.py: * moap/test/test_vcs_darcs.py: * moap/test/test_vcs_git.py: * moap/test/test_vcs_svn.py: Fix finding the binaries. 2007-06-24 Thomas Vander Stichele * moap.doap: Change URL's to http:// now that we've fixed the site. 2007-06-17 Thomas Vander Stichele * moap/test/test_vcs_bzr.py: * moap/test/test_vcs_cvs.py: * moap/test/test_vcs_darcs.py: * moap/test/test_vcs_git.py: * moap/test/test_vcs_svn.py: Add checks to all tests, redirect output. 2007-06-17 Thomas Vander Stichele * moap/test/test_vcs_darcs.py: * moap/test/test_vcs_git.py: Skip tests if darcs or git are missing. 2007-06-17 Thomas Vander Stichele * moap/test/test_vcs_svn.py: Subclass from common.SVNTestCase and use its methods more. Add a test that triggers bug #252. * moap/vcs/vcs.py: Handle the case where the diff is the single line on a one-line file, which gets diff location markers like @@ -1 +1 @@ * moap/vcs/svn.py: Fixes #252 by scrubbing the output from property changes. Coverage: 74 % (1038 / 1392) 2007-06-17 Thomas Vander Stichele * moap/command/cl.py: When failing to update, output the actual output, not e.args 2007-06-17 Thomas Vander Stichele * moap/test/test_commands_cl.py: Fix test to use moap cl prep -c (since it's no longer the default). 2007-06-17 Thomas Vander Stichele Patch by: Philippe Normand * moap/command/cl.py (Prepare.addOptions, Prepare.do): (Reversed command line option logic from the patch) Don't do tag extraction by default, and use -c, --ctags to extract them. Fixes #255. 2007-06-17 Thomas Vander Stichele * Makefile.am: Set PYTHONPATH and invoke moap from the bin directory. Fixes #254. 2007-06-03 Thomas Vander Stichele * moap/extern/command/command.py (Command.parse): set self.options before calling handleOptions() * moap/test/ChangeLog/ChangeLog.gst-plugins-base: * moap/test/test_command_cl.py: * moap/test/Makefile.am: Add test for moap changelog contributors. * moap/commands/cl.py: Implement "moap changelog contributors" to get a list of the contributors to a given release. Coverage: 74 % (1027 / 1382) 2007-05-30 Thomas Vander Stichele patch by: Edward Hervey * moap/command/cl.py (Prepare.do): Fix detection of ctags binary. Fixes #250. 2007-05-28 Thomas Vander Stichele * moap/vcs/git.py (detect, Git, Git.getNotIgnored, Git.ignore, Git.commit, Git.diff, Git.getFileMatcher, Git.update): Add a git backend. * moap/vcs/Makefile.am: Add git and darcs for installation. * moap/test/Makefile.am: * moap/test/test_vcs_git.py (GitTestCase, GitTestCase.setUp, GitTestCase.tearDown, TestDetect, TestDetect.testDetectRepository, TestDetect.testDetectCheckout, TestDetect.testHalfCheckout, TestTree, TestTree.testGit, TestIgnore, TestIgnore.testGetUnignored): Add tests for git backend. Coverage: 73 % ( 983 / 1335) 2007-05-27 Thomas Vander Stichele * moap/vcs/vcs.py (VCS.getChanges): Do a better old/new Line/Count calculation that works correctly for lines changed at top or bottom. * moap/test/Makefile.am: * moap/test/diff/svn_add_first_last_line.diff: * moap/test/test_vcs_svn.py (TestDiff.testGetChangesMultiple, TestDiff.testAddFirstLast): Add tests for it. 2007-05-27 Thomas Vander Stichele * moap/test/test_vcs_svn.py (TestDiff.testGetChanges, TestDiff.testGetChangesMultiple): Verify the results of moap.vcs.svn.SVN.getChanges() 2007-05-27 Thomas Vander Stichele * moap/vcs/vcs.py (getNames): Add a function to get a list of VCS names. * moap/command/cl.py (Checkin, Diff, Prepare, ChangeLog): * moap/command/ignore.py (Ignore): Use it to list choices in the docs. 2007-05-26 Thomas Vander Stichele * moap/test/rss/mach.rss.cheetah: Commit whitespace changes in generated rss feed. 2007-05-26 Thomas Vander Stichele * HACKING: * Makefile.am: Add hacking notes. 2007-05-26 Thomas Vander Stichele * moap/test/Makefile.am: * moap/test/test_vcs_bzr.py: Add a test. * moap/vcs/bzr.py: Use commands instead of subprocess, so it works with Python 2.3 Various re-introductions of os.chdir trickery to fix the test. 2007-05-26 Thomas Vander Stichele Patch by: Andy Wingo * moap/vcs/Makefile.am: * moap/vcs/bzr.py (_getoutput, _getstatusoutput, detect, Bzr, Bzr.getNotIgnored, Bzr.ignore, Bzr.commit, Bzr.diff, Bzr.getFileMatcher, Bzr.update): Added Bazaar backend. Fixes #243. 2007-05-25 Thomas Vander Stichele * moap/util/deps.py: Add Ubuntu information for ctags and Cheetah. Fixes #248. 2007-05-25 Thomas Vander Stichele * moap/util/deps.py: Use Distro.distributor as prefix for installation methods. Add dependency installation info for Ubuntu for genshi and RDF. Fixes #241. 2007-05-25 Thomas Vander Stichele * moap/util/deps.py (RDF.FedoraCore_install, Cheetah.FedoraCore_install, genshi.FedoraCore_install, pygoogle.FedoraCore_install, yahoo.FedoraCore_install, ctags.FedoraCore_install): Now fix Fedora installation instructions again. 2007-05-25 Thomas Vander Stichele * moap/util/deps.py (getTicketURL, handleMissingDependency): Make it easier to file a bug on a missing dependency. 2007-05-25 Thomas Vander Stichele * moap/util/deps.py: * moap/util/distro.py: Rewrite Distro class. Rewrite code to use lsb_release, seems more generic. 2007-05-25 Thomas Vander Stichele * moap/test/test_bug_bugzilla.py: * moap/test/test_commands_doap.py: Fix for when RDF is not installed. * moap/vcs/darcs.py: Fix some pychecker warnings. 2007-05-25 Thomas Vander Stichele * moap/command/cl.py (Prepare.do): * moap/util/deps.py (ctags, ctags.fedora_install, handleImportError, handleMissingDependency): Find exuberant ctags better. Add a dep for it. Possibly make separate dep classes for python and other things. 2007-05-20 Thomas Vander Stichele * moap/bug/trac.py: Small cleanup. * moap/command/bug.py (Query, Bug): Add docs and bugzilla. * moap/bug/Makefile.am: * moap/bug/bugzilla.py (detect, Bugzilla, Bugzilla.__init__, Bugzilla.getBug, Bugzilla.query, _BugzillaRDF, _BugzillaRDF.__init__, _BugzillaRDF.addLocation, _BugzillaRDF.getById): Add bugzilla implementation of bug.py * moap/test/Makefile.am: * moap/test/bugzilla/gst-plugins-base-0.10.2.csv: * moap/test/test_bug_bugzilla.py (TestGstCsv, TestGstCsv.setUp, TestGstCsv.testQuery, TestRDFGst, TestRDFGst.setUp, TestRDFGst.testById): Add test for the bugzilla implementation. 2007-05-20 Thomas Vander Stichele * doc/moap.rss2: * moap.doap: * moap/doap/doap.py (Doap._queryReleases, Version): * moap/doap/rss.py (createdToPubDate, cheetah_toRss): Added support for dc:description for a Version, so that we can list changes in the release. Update moap's doap file to add this for the 0.2.4 release. 2007-05-20 Thomas Vander Stichele * configure.ac: Back to trunk. * doc/release: Update. === release 0.2.4 === 2007-05-20 Thomas Vander Stichele * configure.ac: * NEWS: * doc/release: * moap.doap: releasing 0.2.4, "Pacito" 2007-05-20 Thomas Vander Stichele * moap.doap: Add wiki. * moap/command/doap.py (Show.do): Add wiki. * moap/doap/doap.py (Doap.getProject, Project): Fix up query to make more attributes OPTIONAL. Add wiki. * moap/test/test_doap_doap.py (TestDoap.testGetProject): Explain assert. 2007-05-20 Thomas Vander Stichele * moap/command/doap.py (Ical.do): DATE values are without dashes. * moap/test/Makefile.am: * moap/test/ical/mach.ics: * moap/test/test_commands_doap.py (TestDoapMach.setUp): * doc/moap.ics: * doc/moap.rss2: update. 2007-05-19 Thomas Vander Stichele * Makefile.am: Add feeds target, add it to docs too. * doc/moap.rss2: Update feed. * moap/doap/rss.py (createdToPubDate, cheetah_toRss): Fix up templates according to feed validator at http://feedvalidator.org/ * moap/test/Makefile.am: Add regenerate target to regenerate all. * moap/test/rss/mach.rss.cheetah: * moap/test/rss/mach.rss.genshi: Add new reference rss feeds. 2007-05-19 Thomas Vander Stichele * Makefile.am: generate feeds as part of dist * doc/moap.ics: * doc/moap.rss2: Add feeds to SVN so we can link to them. 2007-05-19 Thomas Vander Stichele * moap/util/deps.py (Dependency.install, Dependency.fedora_yum, RDF.fedora_install, Cheetah, Cheetah.fedora_install, handleImportError): Add a method to make the yum install output uniform. RDF is not available at all yet in Fedora. Cheeath is though. * moap/util/distro.py (Distro, Distro.atLeast, getDistroFromRelease, _fedora_getNameVersionFromRelease): Rename distro-specific methods internally to make more sense. Add .atLeast to do string-based version comparisons. * moap/test/test_util_distro.py (TestRelease.testFedora, TestRelease.testGet, TestAtLeast, TestAtLeast.testFedora): Add some tests for atLeast Coverage: 73 % ( 859 / 1172) 2007-05-19 Thomas Vander Stichele * moap/command/doap.py (Rss.do): break into two lines * moap/doap/rss.py (doapsToRss, createdToPubDate, cheetah_toRss): Make the two template language's output as similar as possible. * moap/test/Makefile.am: * moap/test/rss/mach.rss.cheetah: * moap/test/rss/mach.rss.genshi: Add two rss feeds based on the two templating languages. * moap/test/test_commands_doap.py (TestDoapMach.setUp, TestDoapMach.testRssGenshi, TestDoapMach.testRssCheetah): Add tests for the specific template languages. Coverage: 72 % ( 844 / 1157) 2007-05-19 Thomas Vander Stichele * moap/command/doap.py (Rss.do): use self.stdout to print the RSS feed * moap/doap/rss.py: return a string, not a genshi stream object * moap/test/Makefile.am: add a way to re-generate rss/mach.rss * moap/test/rss/mach.rss: add for the test * moap/test/test_commands_doap.py (TestDoapMach.setUp, TestDoapMach.testRss, TestDoapMach.testShow, TestDoapUnspecified, TestDoapUnspecified.setUp, TestDoapUnspecified.testShow): add tests. Coverage: 72 % ( 838 / 1155) 2007-05-19 Thomas Vander Stichele * moap/Makefile.am: * moap/bug/Makefile.am: * moap/command/Makefile.am: * moap/configure/Makefile.am: * moap/doap/Makefile.am: * moap/extern/Makefile.am: * moap/publish/Makefile.am: * moap/test/Makefile.am: * moap/util/Makefile.am: * moap/vcs/Makefile.am: Clean pyc and pyo files. 2007-05-19 Thomas Vander Stichele * moap/util/deps.py (pygoogle, handleImportError): Fix pygoogle dep. 2007-05-19 Thomas Vander Stichele * moap/util/deps.py (handleImportError): Add yahoo to the dep list. 2007-05-19 Thomas Vander Stichele * etc/bash_completion.d/Makefile.am: update also when a moap subdir changes 2007-05-19 Thomas Vander Stichele * moap/command/doap.py (Search, Search.addOptions, Search.handleOptions, Search.do, Search.foundURL, Doap): Implement moap doap search using either google or yahoo to do a search for your project's page rank based on your keyword query. * moap/util/deps.py (genshi, genshi.fedora_install, google, google.fedora_install, yahoo, yahoo.fedora_install, handleImportError): Add deps for google and yahoo. Fix genshi dep. 2007-05-16 Thomas Vander Stichele * moap/command/cl.py (Prepare, Prepare.do): Also check CHANGE_LOG_EMAIL_ADDRESS. 2007-05-01 Thomas Vander Stichele * moap/extern/Makefile.am: * moap/extern/command/__init__.py: * moap/extern/command/command.py: * moap/extern/command/test_command.py: * moap/util/command.py: Move the command module into its own extern dir so other projects can svn:externals include it. 2007-04-29 Thomas Vander Stichele * moap/command/cl.py: Fix an off-by-one bug that was causing us to include too many tags. There's still a more complicated bug left, see FIXME in test. * moap/test/Makefile.am: * moap/test/prepare/mail.patch: * moap/test/prepare/mail.py: Add test files for the bug being fixed. * moap/test/test_commands_cl.py (TestCheckin.testPrepareTagged): Add a test for the now fixed bug. 2007-04-29 Thomas Vander Stichele * moap/util/ctags.py (CTags.getTags): Make count include the given line, which makes more sense compared to how a diff counts. * moap/test/test_util_ctags.py (TestCTags.testGetManyTags, TestCTags.testGetBeforeFirstTag, TestCTags.testGetWithFirstTag, TestCTags.testGetTagBeforeTagLine, TestCTags.testGetTagOnTagLine, TestCTags.testGetTagAfterTagLine, TestCTags.testGetLastTwo, TestCTags.testGetLastTag): Update tests for new getTags behaviour 2007-04-29 Thomas Vander Stichele * moap/util/ctags.py (CTags.getTags): Fix by not clobbering the line variable. 2007-04-25 Thomas Vander Stichele * moap/main.py (Moap): Explain that you can use -h on subcommands. * moap/util/command.py (CommandHelpFormatter.format_description): Format each paragraph (separated by two newlines) separately. 2007-04-22 Thomas Vander Stichele * moap/command/doap.py (Rss.do): Operate on multiple doap files. 2007-04-22 Thomas Vander Stichele * misc/Makefile.am: * misc/pycheckerrc: Add a pycheckerrc. 2007-04-22 Thomas Vander Stichele * moap/command/doap.py (Rss, Rss.addOptions, Rss.handleOptions, Rss.do, Show, Doap, Doap.handleOptions): * moap/doap/Makefile.am: * moap/doap/rss.py (doapsToRss, createdToPubDate, cheetah_toRss, genshi_toRss): Add RSS feed generation based on Genshi or Cheetah templates. 2007-04-22 Thomas Vander Stichele * moap/test/Makefile.am: * moap/test/test_util_distro.py (TestRelease, TestRelease.testFedora): Add a test for new distro module. 2007-04-22 Thomas Vander Stichele * moap/main.py (main): Handle import errors. * moap/util/deps.py (Dependency, Dependency.install, RDF, RDF.fedora_install, genshi, genshi.fedora_install, handleImportError): Flesh out dependency checking code more, using the new distro code. * moap/util/Makefile.am: * moap/util/distro.py (Distro, Distro.__init__, getSysName, getMachine, getDistroFromRelease, _fedora_getVersionFromRelease): Add a distro module to figure out what distro we're on, inspired by codeina. 2007-04-22 Thomas Vander Stichele * moap/command/cl.py (ChangeLogFile.getEntry): * moap/util/command.py (CommandOptionParser.print_help): * moap/util/mail.py (Message): * moap/vcs/vcs.py (VCSException): doc and pychecker fixes 2007-04-22 Thomas Vander Stichele * moap/extern/Makefile.am: Install log.py in its own extern subdir. Fixes #235. 2007-04-17 Thomas Vander Stichele * moap/command/doap.py (Freshmeat.addOptions, Freshmeat.handleOptions, Freshmeat.do): FEATURE: added moap doap freshmeat -b to force a branch name, as Freshmeat uses Default as the default name. === release 0.2.3 === 2007-04-17 Thomas Vander Stichele * moap/command/doap.py (Doap.handleOptions): Find doap file again if nothing is specified. * moap/test/test_commands_doap.py (TestDoapMach.testShow): whitespace. 2007-04-17 Thomas Vander Stichele * moap/vcs/cvs.py (CVS.diff): Also show new files completely in diff. 2007-04-17 Thomas Vander Stichele * moap/command/doap.py (Ical.do): Add a UID, so generated files work with webcal:// for Evolution and Dates. 2007-04-17 Thomas Vander Stichele * moap/command/doap.py (Ical.do): End the calendar only once :) 2007-04-17 Thomas Vander Stichele * moap/command/doap.py (Ical.do): Fix PRODID, even though I'm not sure what's allowed. * moap/test/ical/mach.ical: Fix sample to match. 2007-04-16 Thomas Vander Stichele * moap/command/doap.py (Doap.addOptions, Doap.handleOptions): Support glob-style wildcards to --f argument (needs protecting with quotes from shell) 2007-04-16 Thomas Vander Stichele * moap/command/doap.py (Ical.do, Doap.addOptions, Doap.handleOptions): Allow more than one doap file to be specified. Sort entries from various doap files on time, then doap file index. * moap/test/ical/mach.ical: Update ical file to sort the other way around. Coverage: 73 % ( 798 / 1092) 2007-04-16 Thomas Vander Stichele * moap/test/Makefile.am: * moap/test/test_vcs_darcs.py (DarcsTestCase, DarcsTestCase.setUp, DarcsTestCase.tearDown, TestDetect, TestDetect.testDetectRepository, TestDetect.testDetectCheckout, TestDetect.testHalfCheckout, TestTree, TestTree.testDarcs, TestIgnore, TestIgnore.testGetUnignored, TestDiff, TestDiff.testDiff, TestDiff.testGetChanges, TestDiff.testGetChangesMultiple): * moap/vcs/darcs.py (detect, Darcs.ignore): * moap/vcs/vcs.py (detect, VCS, VCS.ignore): Add tests for darcs. Do a better vcs.darcs.detect Add a doc fix and note to vcs.VCS Coverage: 72 % ( 791 / 1085) 2007-04-16 Thomas Vander Stichele * moap/test/test_commands_doap.py (TestDoapMach, TestDoapMach.setUp, TestDoapMach.testIcal, TestDoapMach.testShow): Add another test. 2007-04-16 Thomas Vander Stichele * moap/command/cl.py (Diff.do, Prepare.do): Replace a print with a self.stdout. Allow moap cl prep to take a directory containing a ChangeLog file. * moap/test/test_commands_cl.py (TestCheckin.testPrepareDiff, TestClMoap2): Add test for diff. Coverage: 67 % ( 725 / 1081) 2007-04-16 Thomas Vander Stichele * Makefile.am: * moap/command/doap.py (Ical, Ical.do, Mail, Doap, Doap.handleOptions): * moap/test/Makefile.am: * moap/test/ical/mach.ical: * moap/test/test_commands_doap.py (TestMachDoapIcal, TestMachDoapIcal.setUp, TestMachDoapIcal.testDoapIcal): * moap/util/command.py (CommandOptionParser.set_stdout, CommandOptionParser.print_help): Add a new command, "moap doap ical", to generate an iCal file from the release dates. Add a unit test. Somehow coverage dropped significantly to 61%, need to bump that up again: Coverage: 61 % ( 665 / 1079) 2007-04-14 Thomas Vander Stichele * moap/command/cl.py (Prepare.do): Don't use ctags on files that got deleted. 2007-04-14 Thomas Vander Stichele * configure.ac: * moap/Makefile.am: * moap/extern/Makefile.am: * moap/test/Makefile.am: * moap/util/log.py (init): Use external log.py from flumotion's svn. 2007-04-13 Thomas Vander Stichele * moap/util/ctags.py (Tag.parse): They're not always pairs, so don't unpack them wrong. 2007-04-09 Thomas Vander Stichele * misc/moap-uninstalled: Don't get empty paths in PATH variables. 2007-04-04 Thomas Vander Stichele * moap/vcs/darcs.py (detect, Darcs, Darcs.getNotIgnored, Darcs.walker, Darcs.ignore, Darcs.commit, Darcs.diff, Darcs.getFileMatcher, Darcs.update): Add first stab at darcs support. * moap/vcs/svn.py (detect): Update doc string. * moap/vcs/vcs.py (detect, VCS.getFileMatcher, VCS.getChanges): Since darcs has slightly different diff output, factor out an overridable getFileMatcher to use in getChanges. 2007-04-03 Thomas Vander Stichele * moap/command/doap.py (Freshmeat.do): Don't use Default as the branch if the moap version specifies it. 2007-04-02 Thomas Vander Stichele * moap/command/cl.py (Prepare.do): Only copy the original ChangeLog file being prepared if it exists. Fixes #234. 2007-03-31 Thomas Vander Stichele * moap/util/command.py (Command.parse, Command.outputUsage, Command.handleOptions): Add outputUsage, synced from savon. 2007-03-31 Thomas Vander Stichele * moap/util/command.py (CommandOptionParser, CommandOptionParser.set_stdout, CommandOptionParser.print_help, Command, Command.__init__, Command.parse): Synchronize with cleanups in savon version. 2007-03-31 Thomas Vander Stichele * etc/bash_completion.d/Makefile.am: * etc/bash_completion.d/bash-compgen (funcName, start): Copy back project-agnostic bash-compgen from savon 2007-03-30 Thomas Vander Stichele * misc/moap-uninstalled: Make uninstalled bash completion work even when no package is installed. 2007-03-26 Thomas Vander Stichele * configure.ac: Back to TRUNK === release 0.2.2 === 2007-03-25 Thomas Vander Stichele * NEWS: * README: * RELEASE: * TODO: * configure.ac: Releasing 0.2.2, "Airlines" 2007-03-25 Thomas Vander Stichele * misc/moap-uninstalled: Only do custom bash trickery on ubuntu, so colors and aliases keep working on my Fedora system. 2007-03-25 Thomas Vander Stichele * moap/command/cl.py (Checkin, Diff, Prepare): Update summary and description. 2007-03-25 Thomas Vander Stichele * moap/doap/doap.py: Remove unused import. * moap/test/test_util_util.py: import common for the FakeStdout class. 2007-03-21 Thomas Vander Stichele * moap/command/cl.py (Diff.do): Add a debug line. * moap/util/log.py (init): Fix another instance of setSavonDebug. * moap/test/common.py (FakeStdOut): move FakeStdout here. * moap/test/test_commands_cl.py (TestClMoap1, TestClMoap1.setUp, TestCheckin.testPrepareDiff, TestClMoap2, TestClMoap2.setUp): Rename some tests. Add a testPrepareDiff test. Test coverage is now 80%. 2007-03-21 Thomas Vander Stichele * moap/test/Makefile.am: * moap/test/test_util_log.py (LogTester, LogFunctionTester, LogFunctionTester.logFunction, TestLog, TestLog.setUp, TestLog.testMoapDebug, TestLog.handler, TestLog.testLimitInvisible, TestLog.testLimitedVisible, TestLog.testFormatStrings, TestLog.testLimitedError, TestLog.testLogHandlerLimitedLevels, TestLog.testLogHandler, TestOwnLogHandler, TestOwnLogHandler.setUp, TestOwnLogHandler.handler, TestOwnLogHandler.testOwnLogHandlerLimited, TestOwnLogHandler.testLogHandlerAssertion, TestGetExceptionMessage, TestGetExceptionMessage.func3, TestGetExceptionMessage.func2, TestGetExceptionMessage.func1, TestGetExceptionMessage.testLevel3, TestGetExceptionMessage.testLevel2, TestGetExceptionMessage.testLevel3, TestGetExceptionMessage.verifyException): Add test copied from Flumotion. Bumps coverage from 67% to 73%. * moap/util/log.py (setMoapDebug): Change name of symbol now that test exposes it is wrong. 2007-03-21 Thomas Vander Stichele * moap/test/test_util_ctags.py (TestTag.testRepr, TestTag.testParse, TestCTags.testGetLastTwo, TestCTags.testGetLastTag, TestCTagsFromString, TestCTagsFromString.testFromEmptyString, TestCTagsFromString.testFromString, TestCTagsFromString.testFromWrongString): * moap/util/ctags.py (CTags.getTags): Increase coverage to 100%. Fix small bugs exposed by adding tests to increase coverage. 2007-03-21 Thomas Vander Stichele * moap/command/cl.py: Remove unused import. * moap/doap/common.py (Querier.addLocation): Remove print. 2007-03-20 Thomas Vander Stichele * moap/doap/doap.py (DoapException, findDoapFile): Add DoapException and raise it from findDoapFile. This avoids outputting to stderr. * moap/command/bug.py (Bug.handleOptions): * moap/command/doap.py (Doap.handleOptions): Handle DoapException. * moap/test/test_commands_cl.py (TestCl2.testGetEntry0): Remove stray print. * moap/util/util.py (editTemp, w): Add stdout and stderr parameters to editTemp so we can redirect output. Add test-case-name line. * moap/test/test_util_util.py (FakeStdOut, FakeStdOut.write): Use fake stdout to absorb prints. 2007-03-20 Thomas Vander Stichele * moap/util/ctags.py (CTags.addString): Don't parse the string if it is empty. Fixes case where we prepare changelog for files ctags doesn't handle. 2007-03-20 Thomas Vander Stichele * NEWS: Add coverage data. 2007-03-20 Thomas Vander Stichele * moap/command/cl.py (Prepare.do): Prettify output. 2007-03-20 Thomas Vander Stichele patch by: Tim Philipp-Müller * moap/util/util.py (writeTemp): Make moap ignore error out if no editor can be found. Closes #232. 2007-03-20 Thomas Vander Stichele * moap/vcs/cvs.py (CVS): * moap/vcs/svn.py (SVN): * moap/vcs/vcs.py (VCS): Add name attribute to VCS classes so we can show it. 2007-03-20 Thomas Vander Stichele * moap/command/cl.py (Prepare.do): Prettify output by letting us know when we are updating from VCS. 2007-03-20 Thomas Vander Stichele * moap/command/cl.py (Checkin.do, Diff.do, Prepare.do): Check for the ctags binary to use. Use self.stdout and self.stderr. 2007-03-20 Thomas Vander Stichele * moap/test/test_vcs_svn.py (TestDiff.testGetChanges, TestDiff.testGetChangesMultiple): Use the correct files for the test. * moap/util/ctags.py (CTags.getTags): Handle the case correctly where we getTags after the line where the last tag starts, returning this last tag. * moap/test/test_util_ctags.py (TestCTags.testGetTagAfterTagLine, TestCTags.testGetLastTag): Add tests. 2007-03-20 Thomas Vander Stichele * moap/vcs/cvs.py (CVS.diff): Fix CVS diff output by using 3 line context on diffs, and using the quiet option to suppress lines like "Diffing". 2007-03-20 Thomas Vander Stichele * moap/command/code.py (Develop.do, Test.do): * moap/command/doap.py (Show.do): Add __pychecker__ = 'no-argsused' to appease pychecker. 2007-03-20 Thomas Vander Stichele * moap/test/test_bash_completion.sh (test_moap): Fix test by adding code as a possible completion. 2007-03-20 Thomas Vander Stichele * TODO: remove item about changelog prepare * moap/vcs/cvs.py (CVS.diff): cvs diff does not like being used on absolute path names * moap/vcs/vcs.py (detect, VCS, VCS.getChanges): Log some more. Handle diff output with text after the second pair of @ 2007-03-20 Thomas Vander Stichele * moap/command/cl.py: Fix up file matcher regexp for the case where a filename has a list of tags changed. * moap/test/ChangeLog/ChangeLog.moap.2: * moap/test/Makefile.am: Add a test file for this. * moap/test/test_commands_cl.py (TestCheckin.testCheckinNewDirectory, TestCl2, TestCl2.setUp, TestCl2.testGetEntry0): Add a test for this. 2007-03-20 Thomas Vander Stichele * moap/util/Makefile.am: * moap/util/ctags.py: Add support for parsing ctags files. * moap/test/ctags/tags: * moap/test/Makefile.am: * moap/test/test_util_ctags.py: Add a test for it. * moap/command/cl.py (ChangeLogFile, ChangeLogFile.__init__, Prepare.do): Use tags to generate more detailed ChangeLog entries; wrap them in 72 characters. * moap/vcs/vcs.py (VCS.getChanges): Take diff context lines into account (hardcoded to 3 lines). 2007-03-19 Thomas Vander Stichele * moap/command/cl.py: Add Prepare command. * moap/test/Makefile.am: * moap/test/diff/svn_add_one_line.diff: * moap/test/diff/svn_multiple.diff: Add two svn diff files for testing. * moap/test/test_vcs_svn.py: Add tests. * moap/vcs/vcs.py: implement getChanges 2007-03-19 Thomas Vander Stichele * moap/command/bug.py: * moap/command/code.py: * moap/command/doap.py: pychecker fixes 2007-03-15 Thomas Vander Stichele * etc/bash_completion.d/Makefile.am: regenerate bash_completion file when the moap src dir changes 2007-03-15 Thomas Vander Stichele * moap/command/Makefile.am: * moap/command/code.py: * moap/main.py: Add a "code" subcommand to test and develop code. 2007-02-21 Thomas Vander Stichele * TODO: * moap/command/cl.py: argument to moap cl ci can be either a dir (which contains a ChangeLog file) or an alternate ChangeLog.whatever file 2007-02-09 Thomas Vander Stichele * misc/moap-uninstalled: run with --noprofile so ubuntu has no chance to reset our shell 2007-02-09 Thomas Vander Stichele * etc/bash_completion.d/Makefile.am: make sure we import our version of moap, so that it works without moap installed and without being in the moap env 2007-02-04 Thomas Vander Stichele * configure.ac: back to TRUNK === release 0.2.1 === 2007-02-04 Thomas Vander Stichele * NEWS: * README: * RELEASE: * configure.ac: * moap.doap: releasing 0.2.1, "Ambulance" 2007-02-03 Thomas Vander Stichele * moap/test/test_bash_completion.sh: add unit test for bash completion 2007-02-03 Thomas Vander Stichele * Makefile.am: * configure.ac: * etc/bash_completion.d/Makefile.am: * etc/bash_completion.d/bash-compgen: * misc/moap-uninstalled: * moap.spec.in: * moap/test/Makefile.am: First stab at adding bash completion, autogenerated from the command classes 2007-02-03 Thomas Vander Stichele * moap/util/command.py: make empty dicts by default 2007-02-03 Thomas Vander Stichele * moap/bug/trac.py: appease pychecker 2007-01-28 Thomas Vander Stichele * Makefile.am: * moap/bug/trac.py: * moap/command/bug.py: * moap/command/cl.py: * moap/command/ignore.py: * moap/doap/common.py: * moap/doap/doap.py: * moap/main.py: * moap/util/mail.py: * moap/util/util.py: * moap/vcs/vcs.py: enable and satisfy pychecker 2007-01-25 Thomas Vander Stichele * moap/command/Makefile.am: * moap/command/doap.py: * moap/command/doapbug.py: * moap/command/bug.py: * moap/main.py: rename doapbug to bug now that it's generic 2007-01-25 Thomas Vander Stichele * moap/command/doapbug.py: make the bug command work both under doap and top-level find a doap file if no URL is specified * moap/main.py: add the bug command to the toplevel * moap/util/command.py: return if handleOptions returned something 2007-01-25 Thomas Vander Stichele * moap/command/doapbug.py: do bug id and query string as arguments, not options 2007-01-25 Thomas Vander Stichele * moap/bug/trac.py: parse newticket URL's better * moap/doap/doap.py: cosmetic fix 2007-01-25 Thomas Vander Stichele * moap/bug/bug.py: add query * moap/bug/trac.py: privatize _getBugFromTicket implement query * moap/command/doapbug.py: handle looking up bug tracker in main Bug command add Query command with a format string 2007-01-25 Thomas Vander Stichele * moap/doap/doap.py: Fix in case project was already cached 2007-01-25 Thomas Vander Stichele * configure.ac: adding moap.bug * moap/Makefile.am: * moap/bug/Makefile.am: * moap/bug/bug.py: * moap/bug/trac.py: adding bug package, with a BugTracker/Bug base class and a Trac implementation * moap/command/Makefile.am: * moap/command/doapbug.py: add command to show a bug based on id 2007-01-25 Thomas Vander Stichele * moap/command/doap.py: * moap/doap/doap.py: move findDoapFile to doap.doap use findDoapFile in the main Doap command so subcommands can rely on it being there 2006-12-17 Thomas Vander Stichele * moap/vcs/cvs.py: * moap/vcs/svn.py: * moap/vcs/vcs.py: add update 2006-12-17 Thomas Vander Stichele * moap/command/doap.py: fix --release option 2006-12-17 Thomas Vander Stichele * configure.ac: back to TRUNK === release 0.2.0 === 2006-12-17 Thomas Vander Stichele * Makefile.am: * NEWS: * README: * RELEASE: * configure.ac: * moap.doap: * moap.spec.in: Readying release. 2006-12-16 Thomas Vander Stichele * configure.ac: Tell configurer when RDF is not present. 2006-12-16 Thomas Vander Stichele * README: * moap.doap: update after move of trac and svn 2006-12-15 Thomas Vander Stichele * moap/util/deps.py: Add a way to verify that the dependency is installed. 2006-12-15 Thomas Vander Stichele * moap/doap/doap.py: Save homepage, bug database, created variables from SQL query. Add stringifyNode method to handle URI resources correctly. Fixes #231. * moap/command/doap.py: Add to show command. 2006-12-15 Thomas Vander Stichele * moap/util/command.py: Fix default no-command message now that help-commands is gone. Fixes #229. 2006-12-15 Thomas Vander Stichele * moap/command/doap.py: Document moap doap mail. Fixes #230. 2006-12-15 Thomas Vander Stichele * TODO: * moap/util/command.py: concatenate Command.usage in a meaningful way * moap/command/cl.py: * moap/command/doap.py: * moap/command/ignore.py: * moap/main.py: fix usage for new behaviour 2006-12-15 Thomas Vander Stichele * moap/util/command.py: add a summary class variable to Command, used in a list save description for a longer paragraph make Command class prefer summary in the help output and description for the command description itself * moap/command/doap.py: add some help to the freshmeat command 2006-12-15 Thomas Vander Stichele * moap.spec.in: take description from doap file 2006-12-15 Thomas Vander Stichele * moap/util/command.py: Sync from savon version, merges --help-commands into help 2006-12-08 Thomas Vander Stichele * moap/command/doap.py: add -R, --release-notes option to allow specifying a RELEASE file to use as part of the announcement 2006-12-06 Thomas Vander Stichele * moap/test/Makefile.am: * moap/test/test_vcs_cvs.py: add missing test 2006-12-05 Thomas Vander Stichele * moap/vcs/cvs.py: Bump coverage from 22% to 84% Properly save and restore cwd Change directory to checkout so cvs commands can find CVSROOT 2006-12-05 Thomas Vander Stichele * moap/test/test_util_util.py: * moap/util/util.py: Bump coverage from 57% to 100% Fix editTemp call when contents is None 2006-12-05 Thomas Vander Stichele * moap/test/test_vcs_svn.py: * moap/vcs/svn.py: bump coverage of this file from 37% to 96% save and restore cwd in commands 2006-12-03 Thomas Vander Stichele * moap/test/test_doap_doap.py: skip test if RDF cannot be imported 2006-12-03 Thomas Vander Stichele * moap/vcs/svn.py: * moap/vcs/vcs.py: log some more remove empty-file check since I don't seem to have it in my FC6 machine 2006-12-03 Thomas Vander Stichele * TODO: add more todo's 2006-09-26 Thomas Vander Stichele * Makefile.am: * moap.doap: adding a doap file * moap/command/doap.py: fix TYPO 2006-09-25 Thomas Vander Stichele * moap/doap/doap.py: make sure we can run moap without RDF 2006-09-25 Thomas Vander Stichele * bin/moap: * moap/util/Makefile.am: * moap/util/deps.py: add a module and function, handleImportError, to show nicer output about a missing dependency 2006-09-16 Thomas Vander Stichele * Makefile.am: * autogen.sh: * bin/Makefile.am: * configure.ac: * misc/Makefile.am: * moap.spec.in: * moap/Makefile.am: * moap/command/Makefile.am: * moap/configure/Makefile.am: * moap/configure/installed.py.in: * moap/configure/uninstalled.py.in: * moap/doap/Makefile.am: * moap/publish/Makefile.am: * moap/test/Makefile.am: * moap/util/Makefile.am: * moap/vcs/Makefile.am: adding autotools 2006-09-10 Thomas Vander Stichele * moap/util/command.py: sync with savon version 2006-08-15 Thomas Vander Stichele * moap/command/ignore.py: fix ignore with correct module 2006-08-15 Thomas Vander Stichele * moap/command/cl.py: * moap/test/common.py: * moap/vcs/svn.py: * moap/vcs/vcs.py: make commit return True or False commit all parents of commit paths as well, non-recursively * moap/test/test_commands_cl.py: add a unit test for doing moap cl ci with a parent dir not yet commited 2006-08-14 Thomas Vander Stichele * moap/command/doap.py: * moap/doap/doap.py: * moap/util/command.py: * moap/util/mail.py: add mail command 2006-08-14 Thomas Vander Stichele * bin/moap: * moap/command/cl.py: * moap/command/doap.py: * moap/commands/cl.py: * moap/commands/doap.py: * moap/commands/ignore.py: * moap/common.py: * moap/main.py: * moap/util/command.py: * moap/util/util.py: * moap/vcs/cvs.py: * moap/vcs/svn.py: * moap/vcs/vcs.py: moved pieces around and started using the command class, allowing me to delete lots of code 2006-08-14 Thomas Vander Stichele * moap/util/command.py: adding command class from savon 2006-08-14 Thomas Vander Stichele * moap/commands/doap.py: * moap/doap/doap.py: fix submitting to freshmeat by using the project shortname, which is the "unix name" 2006-07-06 Thomas Vander Stichele * moap/commands/cl.py: implement moap cl diff: show diffs of files in last entry * moap/vcs/cvs.py: add VCS.diff(self, path) to interface * moap/vcs/svn.py: * moap/vcs/vcs.py: implement 2006-07-02 Thomas Vander Stichele * moap/commands/cl.py: * moap/test/test_commands_cl.py: Fix the file regexp based on a new test case for it * moap/test/ChangeLog/ChangeLog: * moap/test/ChangeLog/ChangeLog.gstreamer: move some ChangeLog files around 2006-06-29 Thomas Vander Stichele * moap/commands/cl.py: * moap/test/ChangeLog/ChangeLog.gstreamer: * moap/test/test_commands_cl.py: Fix a bug with entries like file: function: ... not correctly unmatching the first colon, plus test. 2006-06-21 Thomas Vander Stichele * moap/vcs/cvs.py: Template is not in every CVS/ dir import common 2006-06-20 Thomas Vander Stichele * moap/commands/cl.py: of course we want the ChangeLog commited as well 2006-06-20 Thomas Vander Stichele * moap/test/ChangeLog/ChangeLog: add test file for cl test 2006-06-20 Thomas Vander Stichele * moap/commands/cl.py: * moap/test/test_commands_cl.py: implement the cl ci command * moap/vcs/cvs.py: * moap/vcs/svn.py: * moap/vcs/vcs.py: add and implement .commit() 2006-06-15 Thomas Vander Stichele * moap/vcs/svn.py: add to svn:ignore instead of overwriting 2006-06-12 Thomas Vander Stichele * moap/commands/doap.py: adding a "show" command that displays basic info about the project * moap/doap/doap.py: add shortdesc to Project make Doap.path public 2006-06-12 Thomas Vander Stichele * moap/commands/doap.py: add a "doap" subcommand add a "freshmeat" subcommand to it TODO: generalize the Command class, and make it nesteable ? * moap/doap/common.py: common doap funcionality; a quierier * moap/doap/doap.py: a Doap class and various doap element classes * moap/publish/freshmeat.py: code to publisth to freshmeat * moap/test/doap/mach.doap: a sample doap file * moap/test/test_doap_doap.py: test for the doap code 2006-06-11 Thomas Vander Stichele * moap/commands/ignore.py: add a -n, --no-commit option to not commit to repository commit by default * moap/common.py: * moap/test/test_vcs_svn.py: add a test for svn * moap/vcs/cvs.py: implement getNotIgnored() and ignore() * moap/vcs/svn.py: * moap/vcs/vcs.py: moved _createTree from svn to vcs, and make public 2006-06-11 Thomas Vander Stichele * moap/commands/ignore.py: make ignore start the editor and hand the list of to ignore path to VCS.ignore() * moap/common.py: added writeTemp() and editTemp() * moap/vcs/svn.py: implement VCS.ignore() (tested on moap itself) * moap/vcs/vcs.py: add VCS.ignore() to the interface 2006-06-11 Thomas Vander Stichele * SConstruct: 4 hours of work just to figure out that I can't easily do the equivalent of a command target that runs trial moap.test_moap because I *need* source nodes *and* target nodes * moap/common.py: fix getEditor() 2006-06-11 Thomas Vander Stichele * moap/commands/ignore.py: add -l argument * moap/common.py: add getEditor() * moap/test/common.py: * moap/test/test_common.py: add some tests moap-0.2.7/install-sh0000755000076400007640000003246411150667217011430 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: moap-0.2.7/Makefile.in0000664000076400007640000005221311220504525011453 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # configure.ac needs to AM_CONDITIONAL HAVE_PYCHECKER VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/moap.spec.in \ $(top_srcdir)/configure $(top_srcdir)/m4/pychecker.mk AUTHORS \ COPYING ChangeLog INSTALL NEWS TODO install-sh missing \ py-compile subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = moap.spec SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } GZIP_ENV = --best DIST_ARCHIVES = $(distdir).tar.bz2 distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = -I m4 AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ # include this snippet for the pychecker stuff # Makefile.am needs to define # PYCHECKER_WHITELIST # and # PYCHECKER_BLACKLIST # can be overridden to point to a different pychecker PYCHECKER = pychecker PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # version first -- they are parsed LTR and later options depend on automake 1.8 AUTOMAKE_OPTIONS = 1.8 dist-bzip2 no-dist-gzip SUBDIRS = bin etc moap doc m4 misc EXTRA_DIST = HACKING moap.spec moap.doap RELEASE PYCHECKER_WHITELIST = \ moap/*.py \ moap/bug/*.py \ moap/command/*.py \ moap/doap/*.py \ moap/util/*.py \ moap/vcs/*.py PYCHECKER_BLACKLIST = \ moap/bug/bugzilla.py pychecker_setup = `ls $(top_srcdir)/misc/setup.py 2> /dev/null` pychecker_help = `ls $(top_srcdir)/misc/pycheckerhelp.py 2> /dev/null` pychecker = \ $(PYCHECKER) -Q -F misc/pycheckerrc \ $(pychecker_setup) \ $(pychecker_help) # during distcheck, we get executed from $(NAME)-$(VERSION)/_build, while # our python sources are one level up. Figure this out and set a OUR_PATH # this uses Makefile syntax, so we need to protect it from automake thisdir = $(shell basename `pwd`) OUR_PATH = $(if $(subst _build,,$(thisdir)),$(shell pwd),$(shell pwd)/..) pychecker_files = $(filter-out $(PYCHECKER_BLACKLIST),$(wildcard $(PYCHECKER_WHITELIST))) all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/m4/pychecker.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) moap.spec: $(top_builddir)/config.status $(srcdir)/moap.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-local ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ distclean distclean-generic distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am check: pychecker check-python check-bash check-python: trial moap.test check-bash: $(SHELL) $(top_srcdir)/moap/test/test_bash_completion.sh $(top_builddir)/etc/bash_completion.d/moap _trial_temp/coverage: $(top_srcdir)/moap/*.py $(top_srcdir)/moap/*/*.py trial --coverage moap.test coverage: _trial_temp/coverage python misc/show-coverage.py `ls _trial_temp/coverage/moap* | grep -v moap.test | grep -v moap.extern` clean-local: @rm -rf _trial_temp release: dist make $(PACKAGE)-$(VERSION).tar.bz2.md5 # generate md5 sum files %.md5: % md5sum $< > $@ @HAVE_PYCHECKER_TRUE@check-local-pychecker: pychecker @HAVE_PYCHECKER_FALSE@check-local-pychecker: @HAVE_PYCHECKER_FALSE@ echo "Pychecker not found, passing" # we redirect stderr so we don't get messages like # warning: couldn't find real module for class SSL.Error (module name: SSL) # which can't be turned off in pychecker pycheckersplit: @echo running pychecker on each file ... @for file in $(pychecker_all_files) do \ $(pychecker) $$file > /dev/null 2>&1 \ if test $$? -ne 0; then \ echo "Error on $$file"; \ $(pychecker) $$file; break \ fi \ done pychecker: @echo running pychecker ... @$(pychecker) $(pychecker_files) 2>/dev/null || make pycheckerverbose pycheckerverbose: @echo "running pychecker (verbose) ..." $(pychecker) $(pychecker_files) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/missing0000755000076400007640000002557711150667217011032 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: moap-0.2.7/bin/0000777000076400007640000000000011220504670010236 500000000000000moap-0.2.7/bin/Makefile.in0000664000076400007640000002244511220504523012225 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = bin DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bin_SCRIPTS = moap EXTRA_DIST = $(bin_SCRIPTS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binSCRIPTS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-binSCRIPTS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/bin/moap0000775000076400007640000000127710653274707011063 00000000000000#!/usr/bin/env python # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import sys # first try to import moap try: import moap except ImportError: sys.stderr.write('''The moap binary cannot find its python package. This means that the 'moap' directory containing __init__.py is not on your PYTHONPATH. Typically this is due to a broken install. Please fix the problem, and verify that it is fixed by starting python and typing: >>> import moap and assure it doesn't raise an exception. ''') sys.exit(1) # now load the main function try: from moap.main import main sys.exit(main(sys.argv[1:])) except ImportError, e: from moap.util import deps deps.handleImportError(e) moap-0.2.7/bin/Makefile.am0000644000076400007640000000006010540745416012213 00000000000000bin_SCRIPTS = moap EXTRA_DIST = $(bin_SCRIPTS) moap-0.2.7/AUTHORS0000644000076400007640000000006510541313370010453 00000000000000Thomas Vander Stichele (thomas at apestaart dot org) moap-0.2.7/README0000664000076400007640000001134611220504064010266 00000000000000moap is a swiss army knife for project maintainers and developers. It aims to help in keeping you in the flow of maintaining, developing and releasing, automating whatever tasks can be automated. FEATURES -------- The current list of features includes: - parse DOAP files and: - submit releases to Freshmeat - send out release announcement mails - create iCal and RSS release feeds from DOAP file(s) - template them using Genshi or Cheetah - look up project home page rank on Google and Yahoo for given queries - version control tools: - currently supports Bazaar, CVS, Darcs, Git, SVN, git-svn - maintain ignore lists - prepare ChangeLog entry based on local diff, using ctags - check in based on ChangeLog entry - show diff based on last ChangeLog entry - archive checkout - bug tracker tools: - show individual bugs and queries from trac and bugzilla - developed in Python, with unit tests and coverage - get list of contributors from ChangeLog - search through ChangeLog - bash completion - administering a trac installation Future features planned include: - support for other VCS systems - sending patches and attaching them to bug trackers - working with quilt DEPENDENCIES ------------ moap requires Python 2.3. moap can make use of: - the Redland python bindings (RDF), for parsing of DOAP files - bzr, cvs, darcs, git, git-svn, and svn, for handling checkouts - Genshi and Cheetah, for templating - exuberant-ctags, for tag extraction - Twisted's trial, for unit tests - epydoc, for API documentation - trac, for maintaining a trac installation GETTING MOAP ------------ Preferably, install moap from a package supplied by your distribution. If no package is available, you can build it from a source tarball. If you want to hack on it or want to try the bleeding edge version, you can check it out from subversion. If you are building from a source tarball or checkout, you can choose to use moap installed or uninstalled. - getting: - Change to a directory where you want to put the moap source code (For example, $HOME/dev/ext or $HOME/prefix/src) - source: download tarball, unpack, and change to its directory - checkout: svn co https://thomas.apestaart.org/moap/svn/trunk moap cd moap ./autogen.sh - building: ./configure make - you can now choose to install it or run it uninstalled. - installing: make install - running uninstalled: ln -sf `pwd`/misc/moap-uninstalled $HOME/bin/moap-trunk moap-trunk (this drops you in a shell where everything is set up to use moap) - test basic functionality: moap doap show (should show you project information for moap itself) RUNNING MOAP ------------ moap is self-documenting. moap -h gives you the basic instructions. moap implements a tree of commands; for example, the top-level 'changelog' command has a number of sub-commands. Positioning of arguments is important; moap doap -f (file) show is correct, while moap doap show -f (file) is not, because the -f argument applies to the doap command. EXAMPLES -------- - to get help on the changelog command: moap cl -h - to create a new ChangeLog entry based on the local modifications: moap cl prep - to check in all files mentioned in the latest ChangeLog entry: moap cl ci - update ignore lists: moap ignore (then edit the file and keep only the files that need to be ignored) - show information about your project: moap doap show - submit the 0.2.0 release of your project to freshmeat: moap doap -v 0.2.0 freshmeat DOGFOODING ---------- moap is hip to the kid's lingo and is 100% dogfoodable. The ChangeLog is managed with moap changelog commands. The list of files that SVN should ignore is managed with moap ignore. The list of bugs fixed is generated with moap doap bug query. The releases are announced to freshmeat with moap doap freshmeat. Mails get sent out with moap doap mail. DEBUGGING --------- You can set the MOAP_DEBUG environment variable to get debug output. The variable takes a comma-separated list of category:value strings. To get all debugging, set MOAP_DEBUG to *:5 BUGS, ENHANCEMENTS, ... ----------------------- All issues can be filed at http://thomas.apestaart.org/moap/trac/newticket DOAP ---- For more information on DOAP, see http://usefulinc.com/doap/ You can create a DOAP file easily using the DOAP A Matic website: http://crschmidt.net/semweb/doapamatic/ Python projects using setuptools can easily get a DOAP file generated by registering with CheeseShop: python setup.py sdist register The DOAP file ends up here: http://cheeseshop.python.org/pypi?:action=doap&name= CONTACT ------- The moap project page is http://thomas.apestaart.org/moap/trac/ There is no mailing list yet. You can mail me at thomas apestaart org for now. moap-0.2.7/moap/0000777000076400007640000000000011220504670010422 500000000000000moap-0.2.7/moap/publish/0000777000076400007640000000000011220504670012070 500000000000000moap-0.2.7/moap/publish/freshmeat.py0000644000076400007640000001615010540745422014345 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # routines to interface with Freshmeat through XML-RPC # see http://freshmeat.net/faq/view/49/ # taken from "shipper" and adapted import xmlrpclib import netrc # This is how we sanity-check against the XML-RPC API version. required_major = "1" required_minor = "02" class SessionException(Exception): def __init__(self, message): self.message = message def __repr__(self): return '' % self.message __str__ = __repr__ class SessionError(SessionException): """ One of the XML-RPC errors from the Freshmeat API. """ def __init__(self, code, message): self.code = code self.message = message def __repr__(self): return '' % (self.code, self.message) class Session: "Encapsulate the state of a Freshmeat session." freshmeat_xmlrpc = "http://freshmeat.net/xmlrpc/" def __init__(self, login=None, password=None, verbose=0): """ Create an XML-RPC session to Freshmeat. """ self.verbose = verbose self._sid = None # set to session ID if logged in # Open xml-rpc connection to Freshmeat self._session = xmlrpclib.Server(Session.freshmeat_xmlrpc, verbose=verbose) def _assert_logged_in(self): if not self._sid: raise SessionException("Not logged in") def fetch_available_licenses(self): return self._session.fetch_available_licenses() def login(self, login=None, password=None): # If user didn't supply credentials, fetch from ~/.netrc if not login: try: credentials = netrc.netrc() except netrc.NetrcParseError, e: raise SessionException("ill-formed .netrc: %s:%s %s" \ % (e.filename, e.lineno, e.msg)) except IOError, e: raise SessionException(("missing .netrc file %s" % \ str(e).split()[-1])) ret = credentials.authenticators("freshmeat") if not ret: raise SessionException("no credentials for Freshmeat") login, account, password = ret # Log in to Freshmeat response = self._session.login( \ {"username":login, "password":password}) self._sid = response['SID'] self.lifetime = response['Lifetime'] api_version = response['API Version'] # Sanity-check against the version (major, minor) = api_version.split(".") if major != required_major or minor < required_minor: raise SessionException("this version is out of date; get a replacement from Freshmeat.") if self.verbose: print "Session ID = %s, lifetime = %s" % (self._sid, self.lifetime) def fetch_branch_list(self, project_name): "Get the branch list for the current project." self._assert_logged_in() if self.verbose: print "About to look up project" branch_list = self._session.fetch_branch_list({ 'SID': self._sid, 'project_name': project_name }) if self.verbose: print "Project branch list is:", branch_list return branch_list def fetch_release(self, project_name, branch_name, version): """ @returns: dict with release_focus, version, changes, hide_from_frontpage """ self._assert_logged_in() args = ({ 'SID': self._sid, 'project_name': project_name, 'branch_name': branch_name, 'version': version, }) try: result = self._session.fetch_release(args) except xmlrpclib.Fault, e: raise SessionError(e.faultCode, e.faultString) return result def publish_release(self, **data): """ Add a new release. The "license" and "url_*" fields are optional and will be taken from the branch record if they are omitted from the submission. The 'hide_from_frontpage' option can be omitted an defaults to 'do not hide'. @param project_name: Project name to submit a release for @param branch_name: Branch name to submit a release for @param version: Version string of new release @param changes: Changes list, no HTML, character limit 600 chars Empty will return error code 60. @param release_focus: Release focus ID of new release (see Appendix A) @param hide_from_frontpage: 'Y' if release is to be hidden from frontpage, everything else does not hide it @param license: Branch license @param url_homepage: Homepage @param url_tgz: Tar/GZ @param url_bz2: Tar/BZ2 @param url_zip: Zip @param url_changelog: Changelog @param url_rpm: RPM package @param url_deb: Debian package @param url_osx: OS X package @param url_bsdport: BSD Ports URL @param url_purchase: Purchase @param url_cvs: CVS tree (cvsweb) @param url_list: Mailing list archive @param url_mirror: Mirror site @param url_demo: Demo site """ data['SID'] = self._sid try: response = self._session.publish_release(data) except xmlrpclib.Fault, e: raise SessionError(e.faultCode, e.faultString) if "OK" not in response: raise SessionException(response) def withdraw_release(self, release): response = self._session.withdraw_release(release) if "OK" not in response: raise SessionException(response) def logout(self): "End the session." ret = self._session.logout({ "SID": self._sid }) self._sid = None return ret freshmeat_field_map = ( ("Project", "p", "project_name"), ("Branch", "b", "branch_name"), ("Version", "v", "version"), ("Changes", "c", "changes"), ("Release-Focus", "r", "release_focus"), ("Hide", "x", "hide_from_frontpage"), ("License", "l", "license"), ("Home-Page-URL", "H", "url_homepage"), ("Gzipped-Tar-URL", "G", "url_tgz"), ("Bzipped-Tar-URL", "B", "url_bz2"), ("Zipped-Tar-URL", "Z", "url_zip"), ("Changelog-URL", "C", "url_changelog"), ("RPM-URL", "R", "url_rpm"), ("Debian-URL", "D", "url_deb"), ("OSX-URL", "O", "url_osx"), ("BSD-Port-URL", "P", "url_bsdport"), ("Purchase-URL", "U", "url_purchase"), ("CVS-URL", "S", "url_cvs"), ("Mailing-List-URL", "L", "url_list"), ("Mirror-Site-URL", "M", "url_mirror"), ("Demo-URL", "E", "url_demo"), ) moap-0.2.7/moap/publish/Makefile.in0000664000076400007640000002373211220504524014060 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = moap/publish DIST_COMMON = $(moap_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(moapdir)" moapPYTHON_INSTALL = $(INSTALL_DATA) py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/publish moap_PYTHON = \ __init__.py \ freshmeat.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu moap/publish/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu moap/publish/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-moapPYTHON: $(moap_PYTHON) @$(NORMAL_INSTALL) test -z "$(moapdir)" || $(MKDIR_P) "$(DESTDIR)$(moapdir)" @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(moapPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(moapdir)/$$f'"; \ $(moapPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(moapdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(moapdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(moapdir)" $$dlist; \ fi; \ else :; fi uninstall-moapPYTHON: @$(NORMAL_UNINSTALL) @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(moapdir)/$$f"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}c"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}o"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(moapdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-moapPYTHON install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-moapPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-moapPYTHON install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-moapPYTHON # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/moap/publish/Makefile.am0000664000076400007640000000015510626006360014045 00000000000000CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/publish moap_PYTHON = \ __init__.py \ freshmeat.py moap-0.2.7/moap/publish/__init__.py0000644000076400007640000000000010540745422014111 00000000000000moap-0.2.7/moap/bug/0000777000076400007640000000000011220504670011177 500000000000000moap-0.2.7/moap/bug/trac.py0000664000076400007640000000357611154032731012433 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import xmlrpclib from moap.bug import bug def detect(URL): # FIXME: do smarter stuff in there if URL.find('trac') == -1: return None if URL.find('/newticket') > -1: URL = URL[:URL.find('/newticket')] return URL class Trac(bug.BugTracker): def __init__(self, URL): bug.BugTracker.__init__(self, URL) self.debug('Contacting server at %s' % self.URL) self._server = xmlrpclib.ServerProxy(self.URL + '/xmlrpc') def getBug(self, id): """ @type id: str """ try: ticket = self._server.ticket.get(int(id)) except xmlrpclib.Fault, e: # FIXME: a Fault has a faultCode and faultString # faultCode is 2 both for "not exist" and "id is not integer" # so we use a fragile string search, boo if e.faultString.find(' does not exist') > -1: raise bug.NotFoundError(id) # something else is wrong, reraise raise e if not ticket: return return self._getBugFromTicket(ticket) def query(self, queryString): # multicall.ticket is dynamically added __pychecker__ = 'no-objattrs' multicall = xmlrpclib.MultiCall(self._server) try: result = self._server.ticket.query(queryString) except xmlrpclib.Fault, e: raise e for r in result: multicall.ticket.get(r) ret = [self._getBugFromTicket(t) for t in multicall()] self.debug('Found %d bugs' % len(ret)) return ret def _getBugFromTicket(self, ticket): """ @type ticket: a list as returned by Trac's xml-rpc interface """ bugId = ticket[0] d = ticket[3] summary = d['summary'] return bug.Bug(bugId, summary) BugClass = Trac moap-0.2.7/moap/bug/Makefile.in0000664000076400007640000002374511220504524013173 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = moap/bug DIST_COMMON = $(moap_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(moapdir)" moapPYTHON_INSTALL = $(INSTALL_DATA) py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/bug moap_PYTHON = \ __init__.py \ bug.py \ bugzilla.py \ trac.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu moap/bug/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu moap/bug/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-moapPYTHON: $(moap_PYTHON) @$(NORMAL_INSTALL) test -z "$(moapdir)" || $(MKDIR_P) "$(DESTDIR)$(moapdir)" @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(moapPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(moapdir)/$$f'"; \ $(moapPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(moapdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(moapdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(moapdir)" $$dlist; \ fi; \ else :; fi uninstall-moapPYTHON: @$(NORMAL_UNINSTALL) @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(moapdir)/$$f"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}c"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}o"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(moapdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-moapPYTHON install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-moapPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-moapPYTHON install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-moapPYTHON # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/moap/bug/Makefile.am0000664000076400007640000000020410653274772013165 00000000000000CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/bug moap_PYTHON = \ __init__.py \ bug.py \ bugzilla.py \ trac.py moap-0.2.7/moap/bug/bugzilla.py0000664000076400007640000000475511154032731013313 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_bug_bugzilla -*- # vi:si:et:sw=4:sts=4:ts=4 import csv import urllib2 from moap.bug import bug def detect(URL): # FIXME: do smarter stuff in there if URL.find('bugzilla') == -1: return None return URL class Bugzilla(bug.BugTracker): """ Queries bugzilla using the CSV format. CSV is supported by both Red Hat's and GNOME's bugzilla. """ def __init__(self, URL): # when we get the URL from a DOAP file, scrub the submission part # from it if URL and 'enter_bug.cgi' in URL: URL = URL[:URL.find('enter_bug.cgi')] bug.BugTracker.__init__(self, URL) self.debug('Initialized with URL %s' % URL) def getBug(self, id, handle=None): # a handle can be passed for tests to bypass retrieving a URL return self.query('bug_id=%s' % id, handle)[0] def query(self, queryString, handle=None): result = [] if not handle: url = self.URL + \ "/buglist.cgi?query_format=advanced&ctype=csv&%s" % queryString self.debug('Retrieving url %s' % url) handle = urllib2.urlopen(url) reader = csv.reader(handle) header = reader.next() for row in reader: # turn into a dict d = {} pairs = map(None, header, row) for key, value in pairs: d[key] = value # create the bug b = bug.Bug(d['bug_id'], d['short_short_desc']) result.append(b) return result # FIXME: not yet used class _BugzillaRDF: """ I wrap an RDF location from a bugzilla server. """ def __init__(self): # FIXME: obviously Querier is generic RDF from moap.doap import common self._querier = common.Querier() def addLocation(self, location): self._querier.addLocation(location) def getById(self, id): querystring = """ PREFIX rdf: PREFIX bz: PREFIX nc: SELECT ?description WHERE { ?result rdf:type bz:result . ?result bz:short_short_desc ?description } """ list = self._querier.query(querystring, query_language='sparql') print list assert len(list) == 1, \ "Length of list is %d instead of 1" % len(list) # because r[0] won't work for r in list: pass BugClass = Bugzilla moap-0.2.7/moap/bug/bug.py0000664000076400007640000000350611154032731012250 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 """ Base class for bug tracker abstractions. """ import sys from moap.util import log, util def detect(URL): """ Detect which bug tracker is being used at the given URL. @returns: an instance of a subclass of L{BugTracker}, or None. """ log.debug('bug', 'detecting bug tracker at %s' % URL) systems = util.getPackageModules('moap.bug', ignore=['bug', ]) for s in systems: m = util.namedModule('moap.bug.%s' % s) try: ret = m.detect(URL) except AttributeError: sys.stderr.write('moap.bug.%s is missing detect()\n' % s) continue if ret: try: o = m.BugClass(ret) except AttributeError: sys.stderr.write('moap.bug.%s is missing BugClass()\n' % s) continue return o log.debug('bug', 'did not find %s' % s) return None class BugTracker(log.Loggable): def __init__(self, URL): self.URL = URL def __repr__(self): return '<%s instance at %s>' % (str(self.__class__), self.URL) def getBug(self, id): """ Get the Bug identified by the given id. """ raise NotImplementedError def query(self, queryString): """ Query the database using the given query string. @rtype: list of L{Bug} """ class Bug(log.Loggable): """ I am a bug in a bug tracker. @type id: str @type summary: str """ id = None summary = None def __init__(self, id, summary): self.id = id self.summary = summary class NotFoundError(Exception): """ The bug with the given id was not found. """ def __init__(self, id): Exception.__init__(self, id) self.id = id moap-0.2.7/moap/bug/__init__.py0000644000076400007640000000000010556057251013223 00000000000000moap-0.2.7/moap/Makefile.in0000664000076400007640000003700211220504524012405 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = moap DIST_COMMON = $(moap_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(moapdir)" moapPYTHON_INSTALL = $(INSTALL_DATA) py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap moap_PYTHON = \ __init__.py \ main.py SUBDIRS = extern bug command configure doap publish util vcs test all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu moap/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu moap/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-moapPYTHON: $(moap_PYTHON) @$(NORMAL_INSTALL) test -z "$(moapdir)" || $(MKDIR_P) "$(DESTDIR)$(moapdir)" @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(moapPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(moapdir)/$$f'"; \ $(moapPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(moapdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(moapdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(moapdir)" $$dlist; \ fi; \ else :; fi uninstall-moapPYTHON: @$(NORMAL_UNINSTALL) @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(moapdir)/$$f"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}c"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}o"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(moapdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-moapPYTHON install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-moapPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive distclean distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-moapPYTHON install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-moapPYTHON # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/moap/doap/0000777000076400007640000000000011220504670011345 500000000000000moap-0.2.7/moap/doap/rss.py0000664000076400007640000000750710626006360012457 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_doap_doap -*- # vi:si:et:sw=4:sts=4:ts=4 # rss templating using cheetah/genshi to output RSS feeds of releases import datetime from moap.util import log # the template gets passed 'projects', which contains the project from # each doap object. # FIXME: maybe we want to change to items/entries, where they are sorted, # and contain the doap project they belong to ? def doapsToRss(doaps, template=None, templateType=None): """ Convert the given list of L{moap.doap.doap.Doap} objects to an RSS feed. Caller should handle import errors for missing template languages. @type doaps: list of L{moap.doap.doap.Doap} @type template: str @type templateType: str @param templateType: cheetah or genshi @rtype: str """ projects = [d.getProject() for d in doaps] log.debug("rss", "Generating RSS feed for %d projects", len(projects)) if not templateType: templateType = "genshi" f = templateType + '_toRss' if not f in globals().keys(): raise NotImplementedError, "No support for templates of type %s" % \ templateType return globals()[f](projects, template) def createdToPubDate(created): """ Convert Doap's 'created' format for a date to RSS's 'pubDate' format. """ year = int(created[0:4]) month = int(created[5:7]) day = int(created[8:10]) date = datetime.datetime(year, month, day) pubDate = date.strftime("%a, %d %b %Y 00:00:00 +0000") return pubDate # template language specific templates/handlers CHEETAH_TEMPLATE = """ #set $names = ", ".join([p.name for p in $projects]) Release feed for $names Release feed for $names $projects[0].homepage en #for $project in $projects #for $release in $project.release #set $v = $release.version $project.name $v.revision '$v.name' released release-$project.shortname-$v.revision $project.homepage $createdToPubDate($v.created) $v.description For more information, visit <A HREF="$project.homepage">the project homepage</A> #end for #end for """ def cheetah_toRss(projects, template): import Cheetah.Template if not template: template = CHEETAH_TEMPLATE t = Cheetah.Template.Template(template, searchList=[ { 'projects': projects, 'createdToPubDate': createdToPubDate }]) return str(t) GENSHI_TEMPLATE = """ Release feed for ${projects[0].name} Release feed for ${projects[0].name} ${projects[0].homepage} en ${project.name} ${v.revision} '${v.name}' released release-${project.shortname}-${v.revision} ${project.homepage} ${createdToPubDate(v.created)} ${v.description} For more information, visit <A HREF="${project.homepage}">the project homepage</A> """ def genshi_toRss(projects, template): import genshi.template if not template: template = GENSHI_TEMPLATE t = genshi.template.MarkupTemplate(template) s = t.generate(projects=projects, createdToPubDate=createdToPubDate) return str(s) moap-0.2.7/moap/doap/doap.py0000664000076400007640000001630411174547533012601 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_doap_doap -*- # vi:si:et:sw=4:sts=4:ts=4 # common routines to parse the given list of doap files import os import glob from moap.util import log class DoapException(Exception): """ @type args: 1-tuple of str """ def findDoapFile(path=None): """ Try to find a .doap file in the given path. path can be None (for current directory), a .doap file, or a directory. @rtype: L{Doap} """ if not path: path = os.getcwd() if not os.path.exists(path): raise DoapException('Path %s does not exist.\n' % path) if not path.endswith('.doap'): cands = glob.glob(os.path.join(path, '*.doap')) if not cands: raise DoapException('No .doap file found in %s.\n' % path) if len(cands) > 1: raise DoapException('More than one doap file in %s.\n' \ 'Please specify one.\n' % path) path = cands[0] d = Doap() d.addFile(path) return d class Doap(log.Loggable): logCategory = "doap" """ I abstract a DOAP file. """ def __init__(self): # importing it here makes sure that just starting moap doesn't import # RDF from moap.doap import common self._querier = common.Querier() self.path = None self._project = None def addFile(self, file): if not os.path.exists(file): raise KeyError self.path = file location = "file:%s" % file self.debug('adding location %s' % location) self._querier.addLocation(location) def getProject(self): if not self._project: self.debug('Querying project') # every argument that can be optional separately # has to be inside its own OPTIONAL block querystring = """ PREFIX rdf: PREFIX doap: PREFIX foaf: SELECT ?name, ?shortname, $description, ?shortdesc, ?homepage, ?bug, ?download, ?wiki, ?created WHERE { ?project rdf:type doap:Project . ?project doap:homepage ?homepage . ?project doap:name ?name . OPTIONAL { ?project doap:shortname ?shortname } OPTIONAL { ?project doap:description $description } OPTIONAL { ?project doap:shortdesc ?shortdesc } OPTIONAL { ?project doap:created ?created } OPTIONAL { ?project doap:bug-database ?bug } OPTIONAL { ?project doap:download-page ?download } OPTIONAL { ?project doap:wiki ?wiki } } """ result = self._querier.query(querystring, query_language='sparql') assert len(result) == 1, \ "Length of result is %d instead of 1" % len(result) # because r[0] won't work for r in result: pass self.log('Query result: %r' % r) p = Project() # homepage is required p.homepage = stringifyNode(r['homepage']) p.name = str(r['name']) self.debug('Found Project named %s' % p.name) # optional nodes if r['shortname']: p.shortname = str(r['shortname']) if r['description']: p.description = r['description'].literal_value['string'] if r['shortdesc']: p.shortdesc = r['shortdesc'].literal_value['string'].strip() if r['created']: p.created = str(r['created']) if r['bug']: p.bug_database = stringifyNode(r['bug']) if r['download']: p.download_page = stringifyNode(r['download']) if r['wiki']: p.wiki = stringifyNode(r['wiki']) self._project = p self._queryReleases(p) return self._project def _queryReleases(self, p): # query releases for the given project and add them querystring = """ PREFIX rdf: PREFIX dc: PREFIX doap: PREFIX foaf: SELECT ?projectId, ?name, ?branch, ?revision, ?created, ?description WHERE { ?project rdf:type doap:Project . ?project doap:shortname ?projectId . ?project doap:release ?release . ?release doap:name ?name . ?release doap:branch ?branch . ?release doap:revision ?revision . ?release doap:created ?created OPTIONAL { ?release dc:description ?description } } ORDER BY DESC(?created) """ result = self._querier.query(querystring, query_language='sparql') for r in result: projectId = str(r['projectId']) if projectId != p.shortname: continue v = Version() v.name = str(r['name']) v.revision = str(r['revision']) self.debug('Found Version with revision %s' % v.revision) v.branch = str(r['branch']) if r['description']: v.description = str(r['description']) if r.has_key('created'): v.created = str(r['created']) r = Release() r.version = v p.release.append(r) self._queryFileReleases(p, v) def _queryFileReleases(self, p, v): # query releases for the given version and add them projectId = p.shortname revision = v.revision querystring = """ PREFIX rdf: PREFIX doap: PREFIX foaf: SELECT ?fileRelease WHERE { ?project rdf:type doap:Project . ?project doap:shortname "%(projectId)s" . ?project doap:release ?release . ?release doap:revision "%(revision)s" . ?release doap:file-release ?fileRelease } """ % locals() result = self._querier.query(querystring, query_language='sparql') for r in result: f = r['fileRelease'] uri = stringifyNode(f) self.log('Found file-release %s' % uri) v.file_release.append(uri) class Project: """ @cvar release: list of releases, ordered from youngest to oldest @type release: list of L{Release} """ name = None shortname = None description = None shortdesc = None created = None homepage = None bug_database = None download_page = None wiki = None def __init__(self): self.release = [] def getRelease(self, revision): """ look up the release that has the matching version revision. @rtype: L{Release} """ for r in self.release: if r.version.revision == revision: return r return None class Release: version = None class Version: """ @cvar file_release: list of file-release entries (FIXME) """ revision = None branch = None name = None created = None description = None def __init__(self): self.file_release = [] def __repr__(self): return '' % self.revision def stringifyNode(node): if node.is_resource(): return str(node.uri) else: return str(node) moap-0.2.7/moap/doap/common.py0000664000076400007640000000240410600063510013117 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # common routines to parse the given list of doap files import RDF class RDFException(Exception): pass class Querier: def __init__(self, location=None): """ Create a querier for the .doap file at the given location. """ # need to create a storage to create a model self.storage = RDF.Storage( storage_name="hashes", name="test", options_string="new='yes',hash-type='memory',dir='.'" ) if self.storage is None: raise RDFException("new RDF.Storage failed") # need to create a model to add statements to self.model = RDF.Model(self.storage) if self.model is None: raise RDFException("new RDF.model failed") self.parser = RDF.Parser('raptor') assert self.parser if location: self.addLocation(location) def addLocation(self, location): uri = RDF.Uri(string=location) for s in self.parser.parse_as_stream(uri, uri): self.model.add_statement(s) def query(self, querystring, query_language='sparql'): q = RDF.Query(querystring, query_language=query_language) return q.execute(self.model) moap-0.2.7/moap/doap/Makefile.in0000664000076400007640000002374011220504524013334 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = moap/doap DIST_COMMON = $(moap_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(moapdir)" moapPYTHON_INSTALL = $(INSTALL_DATA) py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/doap moap_PYTHON = \ __init__.py \ common.py \ doap.py \ rss.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu moap/doap/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu moap/doap/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-moapPYTHON: $(moap_PYTHON) @$(NORMAL_INSTALL) test -z "$(moapdir)" || $(MKDIR_P) "$(DESTDIR)$(moapdir)" @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(moapPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(moapdir)/$$f'"; \ $(moapPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(moapdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(moapdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(moapdir)" $$dlist; \ fi; \ else :; fi uninstall-moapPYTHON: @$(NORMAL_UNINSTALL) @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(moapdir)/$$f"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}c"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}o"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(moapdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-moapPYTHON install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-moapPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-moapPYTHON install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-moapPYTHON # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/moap/doap/Makefile.am0000664000076400007640000000017410626006360013323 00000000000000CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/doap moap_PYTHON = \ __init__.py \ common.py \ doap.py \ rss.py moap-0.2.7/moap/doap/__init__.py0000644000076400007640000000000010540745422013366 00000000000000moap-0.2.7/moap/util/0000777000076400007640000000000011220504670011377 500000000000000moap-0.2.7/moap/util/util.py0000664000076400007640000000734011031222455012646 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_util_util -*- # vi:si:et:sw=4:sts=4:ts=4 import os import sys import stat import tempfile from moap.extern.log import log from moap.extern.command import command def getPackageModules(packageName, ignore=None): """ Get all the modules in the given package. @return: list of module names directly under the given packageName """ ret = [] m = namedModule(packageName) for p in m.__path__: candidates = os.listdir(p) for c in candidates: name, ext = os.path.splitext(c) if ext not in ['.py', '.pyo', '.pyc']: continue if name == "__init__": continue if ignore: if name in ignore: continue if name not in ret: ret.append(name) return ret def namedModule(name): """Return a module given its name.""" topLevel = __import__(name) packages = name.split(".")[1:] m = topLevel for p in packages: m = getattr(m, p) return m def getEditor(environ=None): """ Return an editor that can be used, by checking environment variables. """ if environ is None: environ = os.environ for var in ["VISUAL", "EDITOR"]: if environ.has_key(var): log.debug('util', 'returning editor %s' % environ[var]) return environ[var] log.debug('util', 'returning None editor') return None def writeTemp(contents=None): """ Create a new temporary file that contains the given contents. @return: the path to the temporary file. Unlink after use. """ (fd, path) = tempfile.mkstemp(prefix='moap') if contents: for l in contents: os.write(fd, "%s\n" % l) os.close(fd) return path def editTemp(contents=None, instructions=None, stdout=sys.stdout, stderr=sys.stderr): """ Create and edit a temporary file that contains the given contents and instructions. @type contents: list @type instructions: list @return: the list of non-empty lines in the body, or None if the file was unchanged (which means, abort) """ def w(fd, text): os.write(fd, 'moap: %s\n' % text) (fd, path) = tempfile.mkstemp(prefix='moap') if instructions: w(fd, '-' * 70) for line in instructions: w(fd, line) w(fd, '-' * 70) os.write(fd, '\n') if contents: for line in contents: os.write(fd, "%s\n" % line) os.close(fd) # record the mtime so we can see if the file was changed at all before = os.stat(path)[stat.ST_MTIME] editor = getEditor() if not editor: stderr.write("No editor found, please set the EDITOR or VISUAL " "environment variable.\n") os.unlink(path) return None cmd = "%s %s" % (editor, path) os.system(cmd) after = os.stat(path)[stat.ST_MTIME] if before == after: stdout.write("No changes, ignoring.\n") os.unlink(path) return None lines = [] for line in open(path).readlines(): if line.startswith('moap:'): continue line = line.rstrip() if not line: continue lines.append(line) os.unlink(path) return lines class LogCommand(command.Command, log.Loggable): def __init__(self, parentCommand=None, **kwargs): command.Command.__init__(self, parentCommand, **kwargs) self.logCategory = self.name # command.Command has a fake debug method, so choose the right one def debug(self, format, *args): kwargs = {} log.Loggable.doLog(self, log.DEBUG, -2, format, *args, **kwargs) moap-0.2.7/moap/util/log.py0000644000076400007640000000215710610230735012453 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # moap - Maintenance Of A Project # Copyright (C) 2006 Thomas Vander Stichele # 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 Street #330, Boston, MA 02111-1307, USA. # this file adapted from Flumotion, (C) Copyright Fluendo """ Logging """ from moap.extern.log import log as externlog from moap.extern.log.log import * def init(): externlog.init('MOAP_DEBUG') externlog.setPackageScrubList('moap') setMoapDebug = externlog.setDebug moap-0.2.7/moap/util/Makefile.in0000664000076400007640000002403611220504524013365 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = moap/util DIST_COMMON = $(moap_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(moapdir)" moapPYTHON_INSTALL = $(INSTALL_DATA) py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/util moap_PYTHON = \ __init__.py \ command.py \ ctags.py \ deps.py \ distro.py \ log.py \ mail.py \ usermap.py \ util.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu moap/util/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu moap/util/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-moapPYTHON: $(moap_PYTHON) @$(NORMAL_INSTALL) test -z "$(moapdir)" || $(MKDIR_P) "$(DESTDIR)$(moapdir)" @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(moapPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(moapdir)/$$f'"; \ $(moapPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(moapdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(moapdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(moapdir)" $$dlist; \ fi; \ else :; fi uninstall-moapPYTHON: @$(NORMAL_UNINSTALL) @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(moapdir)/$$f"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}c"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}o"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(moapdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-moapPYTHON install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-moapPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-moapPYTHON install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-moapPYTHON # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/moap/util/ctags.py0000664000076400007640000001040411031222455012765 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_util_ctags -*- # vi:si:et:sw=4:sts=4:ts=4 """ Code to parse ctags files. """ import re from moap.util import log # see man ctags, TAG FILE FORMAT tagMatcher = re.compile('^(.+)\t(\S+)\t(.*);"\t(.*)') class Tag: """ I represent one line in a ctags file. """ name = None file = None line = None language = None klazz = None def __repr__(self): return "" % (self.name, self.file) def parse(self, line): """ Parse a CTags line and set myself from it. """ # example of CTags lines: # pads_cookie gst/gstelement.h /^ guint32 pads_cookie;$/;" m line:438 language:C++ struct:_GstElement # target_state gst/gstelement.h /^ GstState target_state;$/;" m line:444 language:C++ struct:_GstElement:::: m = tagMatcher.search(line) if not m: raise KeyError, "line %s not a ctags line" % line self.name = m.expand('\\1') self.file = m.expand('\\2') extended = m.expand('\\4') for ext in extended.split(): tags = ext.split(':') # ignore one letter indications that do not have : if len(tags) == 1: continue key = tags[0] value = tags[1] if key == 'line': self.line = int(value) elif key == 'language': self.language = value elif key == 'class': self.klazz = value class CTags(log.Loggable): logCategory = "CTags" def __init__(self): self._files = {} # path -> dict of line number -> tag def addFile(self, path): """ Parse tags from the given file and add. """ handle = open(path, "r") self._parse(handle.readlines()) def addString(self, string): if not string: return self._parse(string.split('\n')) def _parse(self, lines): for line in lines: if line.startswith('!_TAG_'): continue # see ticket #275 if line.startswith('ctags: Warning: ignoring null tag'): continue t = Tag() t.parse(line) if not self._files.has_key(t.file): self._files[t.file] = {} self._files[t.file][t.line] = t def getTags(self, file, line, count=1): """ Get all tags for the given file, starting at the given line number, covered by the given count of lines from that point. @returns: list of L{Tag} """ ret = [] if count < 1: return ret tags = self._files[file] starts = tags.keys() starts.sort() i = 0 # look for the tag right before the given line number while tags[starts[i]].line <= line: i += 1 if i == len(starts): # line number is past the last tag, so we only return # the last tag self.debug('Returning only tag starting on %d' % starts[-1]) return [tags[starts[-1]], ] # now i points to a tag on or beyond the given line number, so go back # one i -= 1 if i >= 0: # there is in fact a tag started before the given line, so append it startLine = starts[i] t = tags[startLine] self.debug('appending tag for %s starting on line %d' % ( t.name, startLine)) ret.append(t) # now we go back to the first tag starting on or past the given line # number i += 1 # now find all tags in the given range and append # it is possible we are already past the end of starts while count > 1 and tags[starts[i]].line < line + count: startLine = starts[i] t = tags[startLine] self.debug('appending tag for %s starting on line %d' % ( t.name, startLine)) ret.append(t) i += 1 if i == len(starts): break self.debug('returning %d tags' % len(ret)) return ret moap-0.2.7/moap/util/Makefile.am0000664000076400007640000000027210667073242013364 00000000000000CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/util moap_PYTHON = \ __init__.py \ command.py \ ctags.py \ deps.py \ distro.py \ log.py \ mail.py \ usermap.py \ util.py moap-0.2.7/moap/util/command.py0000664000076400007640000000112611031222455013303 00000000000000# -*- Mode: Python; test-case-name: testsuite.test_util_command -*- # vi:si:et:sw=4:sts=4:ts=4 """ Command class. """ from moap.extern.log import log from moap.extern.command import command class LogCommand(command.Command, log.Loggable): def __init__(self, parentCommand=None, **kwargs): command.Command.__init__(self, parentCommand, **kwargs) self.logCategory = self.name # command.Command has a fake debug method, so choose the right one def debug(self, format, *args): kwargs = {} log.Loggable.doLog(self, log.DEBUG, -2, format, *args, **kwargs) moap-0.2.7/moap/util/distro.py0000664000076400007640000000424610637557002013211 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_util_distro -*- # vi:si:et:sw=4:sts=4:ts=4 import commands import os import distutils.version from moap.util import log """ Figure out what distribution, architecture and version the user is on. """ class Distro: """ @cvar description: a longer human-readable name for the distro @type description: str @cvar distributor: a short lower-case identifier for the distro @type distributor: str @cvar release: the version of the distro @type release: str @cvar arch: the architecture of the distro @type arch: str """ description = None distributor = None release = None arch = None def __init__(self, description, distributor, release, arch): self.description = description self.distributor = distributor self.release = release self.arch = arch def atLeast(self, release): """ @param release: release to compare with @type release: str Returns: whether the distro is at least as new as the given release, taking non-numbers into account. """ mine = distutils.version.LooseVersion(self.release) theirs = distutils.version.LooseVersion(release) return mine >= theirs def getSysName(): """ Get the system name. Typically the first item in the os.uname tuple. """ return os.uname()[1] def getMachine(): """ Get the machine architecture. Typically the fifth item in os.uname. """ return os.uname()[4] def getDistroFromRelease(): """ Decide on the distro based on the presence of a distro-specific release file. rtype: L{Distro} or None. """ # start with lsb_release output = commands.getoutput("lsb_release -i") if output and output.startswith('Distributor ID:'): distributor = output.split(':', 2)[1].strip() output = commands.getoutput("lsb_release -d") description = output.split(':', 2)[1].strip() output = commands.getoutput("lsb_release -r") release = output.split(':', 2)[1].strip() return Distro(description, distributor, release, None) moap-0.2.7/moap/util/deps.py0000664000076400007640000001353111031222455012623 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # code to handle import errors and tell us more information about the # missing dependency import os import sys import urllib from moap.util import distro class Dependency: module = None name = None homepage = None def install(self, distro): """ Return an explanation on how to install the given dependency for the given distro/version/arch. @type distro: L{distro.Distro} @rtype: str or None @returns: an explanation on how to install the dependency, or None. """ name = distro.distributor + '_install' m = getattr(self, name, None) if m: return m(distro) def FedoraCore_yum(self, packageName): """ Returns a string explaining how to install the given package. """ return "On Fedora, you can install %s with:\n" \ "su -c \"yum install %s\"" % (self.module, packageName) def Debian_apt(self, packageName): """ Returns a string explaining how to install the given package. """ return "On Debian, you can install %s with:\n" \ "sudo apt-get install %s" % (self.module, packageName) def Ubuntu_apt(self, packageName): """ Returns a string explaining how to install the given package. """ return "On Ubuntu, you can install %s with:\n" \ "sudo apt-get install %s" % (self.module, packageName) class RDF(Dependency): module = 'RDF' name = "Redland RDF Python Bindings" homepage = "http://librdf.org/docs/python.html" def FedoraCore_install(self, distro): return "python-redland is not yet available in Fedora Extras.\n" def Ubuntu_install(self, distro): return self.Ubuntu_apt('python-librdf') class Cheetah(Dependency): module = 'Cheetah' name = "Cheetah templating language" homepage = "http://cheetahtemplate.org/" def FedoraCore_install(self, distro): if distro.atLeast('4'): return self.FedoraCore_yum('python-cheetah') return "python-cheetah is only available in Fedora 4 or newer.\n" def Ubuntu_install(self, distro): return self.Ubuntu_apt('python-cheetah') class genshi(Dependency): module = 'genshi' name = "Genshi templating language" homepage = "http://genshi.edgewall.com/" def FedoraCore_install(self, distro): return "genshi is not yet available in Fedora Extras.\n" def Ubuntu_install(self, distro): return self.Ubuntu_apt('python-genshi') class pygoogle(Dependency): module = 'pygoogle' name = "A Python Interface to the Google API" homepage = "http://pygoogle.sourceforge.net/" def FedoraCore_install(self, distro): return "pygoogle is not yet available in Fedora Extras.\n" class yahoo(Dependency): module = 'yahoo' name = "A Python Interface to the Yahoo Web API" homepage = "http://developer.yahoo.com/python/" def FedoraCore_install(self, distro): return "python-yahoo is not yet available in Fedora Extras.\n" def Debian_install(self, distro): return self.Debian_apt('python-yahoo') class trac(Dependency): module = 'trac' name = "Trac issue tracker" homepage = "http://trac.edgewall.com/" def FedoraCore_install(self, distro): if distro.atLeast('3'): return self.FedoraCore_yum('trac') return "trac is only available in Fedora 3 or newer.\n" # non-python dependencies class ctags(Dependency): module = 'ctags' name = "Exuberant ctags" homepage = "http://ctags.sourceforge.net/" def FedoraCore_install(self, distro): return self.FedoraCore_yum('ctags') def Ubuntu_install(self, distro): return self.Ubuntu_apt('exuberant-ctags') def handleImportError(exception): """ Handle dependency import errors by displaying more information about the dependency. """ first = exception.args[0] if first.find('No module named ') < 0: raise module = first[len('No module named '):] module = module.split('.')[0] deps = {} for dep in [RDF(), Cheetah(), genshi(), pygoogle(), trac(), yahoo()]: deps[dep.module] = dep if module in deps.keys(): dep = deps[module] sys.stderr.write("Could not import python module '%s'\n" % module) sys.stderr.write('This module is part of %s.\n' % dep.name) handleMissingDependency(dep) # how to confirm the python module got installed sys.stderr.write( 'You can confirm it is installed by starting Python and running:\n') sys.stderr.write('import %s\n' % module) return # re-raise if we didn't have it raise def getTicketURL(summary): reporter = os.environ.get('EMAIL_ADDRESS', None) get = "summary=%s" % urllib.quote(summary) if reporter: get += "&reporter=%s" % urllib.quote(reporter) return 'http://thomas.apestaart.org/moap/trac/newticket?' + get def handleMissingDependency(dep): if dep.homepage: sys.stderr.write('See %s for more information.\n\n' % dep.homepage) d = distro.getDistroFromRelease() if d: howto = dep.install(d) if howto: sys.stderr.write(howto) else: url = getTicketURL('DEP: %s, %s' % (dep.module, d.description)) sys.stderr.write("""On %s, MOAP does not know how to install %s. Please file a bug at: %s with instructions on how to install the dependency so we can add it. """ % (d.description, dep.module, url)) else: url = getTicketURL('DISTRO: Unknown') sys.stderr.write("""MOAP does not know your distribution. Please file a bug at: %s with instructions on how to recognize your distribution so we can add it. """ % url) sys.stderr.write('\n') sys.stderr.write('Please install %s and try again.\n' % dep.module) moap-0.2.7/moap/util/mail.py0000664000076400007640000000560011220442066012612 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_util_mail -*- # vi:si:et:sw=4:sts=4:ts=4 # code to send out a release announcement of the latest or specified version # adapted from http://www.redcor.ch:8180/redcor/redcor/web/intranet_zope_plone/tutorial/faq/SendingMailWithAttachmentsViaPython import smtplib # P2.3 try: from email import encoders except ImportError: from email import Encoders as encoders # P2.3 try: from email.mime import multipart, text, image, audio, base except ImportError: from email import MIMEMultipart as multipart from email import MIMEText as text from email import MIMEImage as image from email import MIMEAudio as audio from email import MIMEBase as base """ Code to send out mails. """ class Message: """ I create e-mail messages with possible attachments. """ def __init__(self, subject, to, fromm): """ @type to: string or list of strings @param to: who to send mail to @type fromm: string @param fromm: who to send mail as """ self.subject = subject self.to = to if isinstance(to, str): self.to = [to, ] self.fromm = fromm self.attachments = [] # list of dicts def setContent(self, content): self.content = content def addAttachment(self, name, mime, content): d = { 'name': name, 'mime': mime, 'content': content, } self.attachments.append(d) def get(self): """ Get the message. """ COMMASPACE = ', ' # Create the container (outer) email message. msg = multipart.MIMEMultipart() msg['Subject'] = self.subject msg['From'] = self.fromm msg['To'] = COMMASPACE.join(self.to) msg.preamble = self.content # add attachments for a in self.attachments: maintype, subtype = a['mime'].split('/', 1) if maintype == 'text': attach = text.MIMEText(a['content'], _subtype=subtype) elif maintype == 'image': attach = image.MIMEImage(a['content'], _subtype=subtype) elif maintype == 'audio': attach = audio.MIMEAudio(a['content'], _subtype=subtype) else: attach = base.MIMEBase(maintype, subtype) attach.set_payload(a['content']) # Encode the payload using Base64 encoders.encode_base64(msg) # Set the filename parameter attach.add_header( 'Content-Disposition', 'attachment', filename=a['name']) msg.attach(attach) return msg.as_string() def send(self, server="localhost"): smtp = smtplib.SMTP(server) result = smtp.sendmail(self.fromm, self.to, self.get()) smtp.close() return result moap-0.2.7/moap/util/usermap.py0000664000076400007640000000161210667073142013354 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_util_usermap -*- # vi:si:et:sw=4:sts=4:ts=4 """ User map class. """ class UserMapException(Exception): pass class UserMap(list): """ I add parse methods to a dictionary to parse a username mapping string. The string contains one entry per line. Each line contains an old username and a new username, separated by a colon. """ def parse(self, text): i = -1 for line in text.strip().split('\n'): i += 1 if line.startswith('#'): continue try: old, new = line.split(':') except ValueError: raise UserMapException("Could not parse line %d (%s)" % ( i, line)) self.append((old, new)) def parseFromPath(self, path): text = open(path).read() self.parse(text) moap-0.2.7/moap/util/__init__.py0000644000076400007640000000000010540745422013420 00000000000000moap-0.2.7/moap/extern/0000777000076400007640000000000011220504670011727 500000000000000moap-0.2.7/moap/extern/log/0000777000076400007640000000000011220504670012510 500000000000000moap-0.2.7/moap/extern/log/test_log.py0000664000076400007640000002323011220226411014612 00000000000000# -*- Mode: Python; test-case-name: test_log -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public License version 2 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. # See "LICENSE.GPL" in the source distribution for more information. # Licensees having purchased or holding a valid Flumotion Advanced # Streaming Server license may use this file in accordance with the # Flumotion Advanced Streaming Server Commercial License Agreement. # See "LICENSE.Flumotion" in the source distribution for more information. # Headers in this file shall remain intact. from twisted.trial import unittest import log __version__ = "$Rev: 7971 $" class LogTester(log.Loggable): logCategory = 'testlog' class LogFunctionTester(log.Loggable): def logFunction(self, format, *args): return (("override " + format), ) + args[1:] class TestLog(unittest.TestCase): def setUp(self): self.category = self.level = self.message = None self.tester = LogTester() # we want to remove the default handler so it doesn't show up stuff log.reset() # just test for parsing semi- or non-valid FLU_DEBUG variables def testSetDebug(self): log.setDebug(":5") log.setDebug("*") log.setDebug("5") def testGetLevelName(self): self.assertRaises(AssertionError, log.getLevelName, -1) self.assertRaises(AssertionError, log.getLevelName, 6) def testGetLevelInt(self): self.assertRaises(AssertionError, log.getLevelInt, "NOLEVEL") def testGetFormattedLevelName(self): self.assertRaises(AssertionError, log.getFormattedLevelName, -1) # FIXME: we're poking at internals here, but without calling this # no format levels are set at all. log._preformatLevels("ENVVAR") self.failUnless("LOG" in log.getFormattedLevelName(log.LOG)) def testGetFileLine(self): # test a function object (filename, line) = log.getFileLine(where=self.testGetFileLine) self.failUnless(filename.endswith('test_log.py')) self.assertEquals(line, 68) # test a lambda f = lambda x: x + 1 (filename, line) = log.getFileLine(where=f) self.failUnless(filename.endswith('test_log.py')) self.assertEquals(line, 75) # test an eval f = eval("lambda x: x + 1") (filename, line) = log.getFileLine(where=f) self.assertEquals(filename, '') self.assertEquals(line, 1) # test for adding a log handler def testEllipsize(self): self.assertEquals(log.ellipsize("*" * 1000), "'" + "*" * 59 + ' ... ' + "*" * 14 + "'") def handler(self, level, object, category, file, line, message): self.level = level self.object = object self.category = category self.file = file self.line = line self.message = message def testLimitInvisible(self): log.setDebug("testlog:3") log.addLimitedLogHandler(self.handler) # log 2 we shouldn't get self.tester.log("not visible") assert not self.category assert not self.level assert not self.message self.tester.debug("not visible") assert not self.category assert not self.level assert not self.message def testLimitedVisible(self): log.setDebug("testlog:3") log.addLimitedLogHandler(self.handler) # log 3 we should get self.tester.info("visible") assert self.category == 'testlog' assert self.level == log.INFO assert self.message == 'visible' self.tester.warning("also visible") assert self.category == 'testlog' assert self.level == log.WARN assert self.message == 'also visible' def testFormatStrings(self): log.setDebug("testlog:3") log.addLimitedLogHandler(self.handler) self.tester.info("%d %s", 42, 'the answer') assert self.category == 'testlog' assert self.level == log.INFO assert self.message == '42 the answer' def testLimitedError(self): log.setDebug("testlog:3") log.addLimitedLogHandler(self.handler) self.assertRaises(SystemExit, self.tester.error, "error") assert self.category == 'testlog' assert self.level == log.ERROR assert self.message == 'error' def testLogHandlerLimitedLevels(self): log.setDebug("testlog:3") log.addLimitedLogHandler(self.handler) # now try debug and log again too log.setDebug("testlog:5") self.tester.debug("debug") assert self.category == 'testlog' assert self.level == log.DEBUG assert self.message == 'debug' self.tester.log("log") assert self.category == 'testlog' assert self.level == log.LOG assert self.message == 'log' # test that we get all log messages def testLogHandler(self): log.setDebug("testlog:3") log.addLogHandler(self.handler) self.tester.log("visible") assert self.message == 'visible' self.tester.warning("also visible") assert self.message == 'also visible' def testAddLogHandlerRaises(self): self.assertRaises(TypeError, log.addLogHandler, 1) class TestOwnLogHandler(unittest.TestCase): def setUp(self): self.category = self.level = self.message = None self.tester = LogFunctionTester() def handler(self, level, object, category, file, line, message): self.level = level self.object = object self.category = category self.file = file self.line = line self.message = message # test if our own log handler correctly mangles the message def testOwnLogHandlerLimited(self): log.setDebug("testlog:3") log.addLogHandler(self.handler) self.tester.log("visible") assert self.message == 'override visible' def testLogHandlerAssertion(self): self.assertRaises(TypeError, log.addLimitedLogHandler, None) class TestGetExceptionMessage(unittest.TestCase): def func3(self): self.func2() def func2(self): self.func1() def func1(self): raise TypeError("I am in func1") def testLevel2(self): try: self.func2() self.fail() except TypeError, e: self.verifyException(e) def testLevel3(self): try: self.func3() self.fail() except TypeError, e: self.verifyException(e) def verifyException(self, e): message = log.getExceptionMessage(e) self.failUnless("func1()" in message) self.failUnless("test_log.py" in message) self.failUnless("TypeError" in message) class TestLogSettings(unittest.TestCase): def testSet(self): old = log.getLogSettings() log.setDebug('*:5') self.assertNotEquals(old, log.getLogSettings()) log.setLogSettings(old) self.assertEquals(old, log.getLogSettings()) class TestWriteMark(unittest.TestCase): def handler(self, level, object, category, file, line, message): self.level = level self.object = object self.category = category self.file = file self.line = line self.message = message def testWriteMarkInDebug(self): loggable = log.Loggable() log.setDebug("4") log.addLogHandler(self.handler) marker = 'test' loggable.writeMarker(marker, log.DEBUG) self.assertEquals(self.message, marker) def testWriteMarkInWarn(self): loggable = log.Loggable() log.setDebug("2") log.addLogHandler(self.handler) marker = 'test' loggable.writeMarker(marker, log.WARN) self.assertEquals(self.message, marker) def testWriteMarkInInfo(self): loggable = log.Loggable() log.setDebug("3") log.addLogHandler(self.handler) marker = 'test' loggable.writeMarker(marker, log.INFO) self.assertEquals(self.message, marker) def testWriteMarkInLog(self): loggable = log.Loggable() log.setDebug("5") log.addLogHandler(self.handler) marker = 'test' loggable.writeMarker(marker, log.LOG) self.assertEquals(self.message, marker) def testWriteMarkInError(self): loggable = log.Loggable() log.setDebug("4") log.addLogHandler(self.handler) marker = 'test' self.assertRaises(SystemExit, loggable.writeMarker, marker, log.ERROR) self.assertEquals(self.message, marker) class TestLogNames(unittest.TestCase): def testGetLevelNames(self): self.assertEquals(['ERROR', 'WARN', 'INFO', 'DEBUG', 'LOG'], log.getLevelNames()) def testGetLevelCode(self): self.assertEquals(1, log.getLevelInt('ERROR')) self.assertEquals(2, log.getLevelInt('WARN')) self.assertEquals(3, log.getLevelInt('INFO')) self.assertEquals(4, log.getLevelInt('DEBUG')) self.assertEquals(5, log.getLevelInt('LOG')) def testGetLevelName(self): self.assertEquals('ERROR', log.getLevelName(1)) self.assertEquals('WARN', log.getLevelName(2)) self.assertEquals('INFO', log.getLevelName(3)) self.assertEquals('DEBUG', log.getLevelName(4)) self.assertEquals('LOG', log.getLevelName(5)) if __name__ == '__main__': unittest.main() moap-0.2.7/moap/extern/log/log.py0000664000076400007640000006657311220241066013577 00000000000000# -*- Mode: Python; test-case-name: test_log -*- # vi:si:et:sw=4:sts=4:ts=4 # This file is released under the standard PSF license. """ Logging module. Five levels of log information are defined. These are, in order of decreasing verbosity: log, debug, info, warning, error. This module provides a Loggable class for objects, as well as various convenience methods for logging in general, and for logging with Twisted and failures in particular. Maintainer: U{Thomas Vander Stichele } """ import errno import sys import os import fnmatch import time import types import traceback # environment variables controlling levels for each category _DEBUG = "*:1" # name of the environment variable controlling our logging _ENV_VAR_NAME = None # package names we should scrub filenames for _PACKAGE_SCRUB_LIST = [] # dynamic dictionary of categories already seen and their level _categories = {} # log handlers registered _log_handlers = [] _log_handlers_limited = [] _initialized = False _stdout = None _stderr = None _old_hup_handler = None # public log levels (ERROR, WARN, INFO, DEBUG, LOG) = range(1, 6) COLORS = {ERROR: 'RED', WARN: 'YELLOW', INFO: 'GREEN', DEBUG: 'BLUE', LOG: 'CYAN'} _FORMATTED_LEVELS = [] _LEVEL_NAMES = ['ERROR', 'WARN', 'INFO', 'DEBUG', 'LOG'] def getLevelName(level): """ Return the name of a log level. @param level: The level we want to know the name @type level: int @return: The name of the level @rtype: str """ assert isinstance(level, int) and level > 0 and level < 6, \ TypeError("Bad debug level") return getLevelNames()[level - 1] def getLevelNames(): """ Return a list with the level names @return: A list with the level names @rtype: list of str """ return _LEVEL_NAMES def getLevelInt(levelName): """ Return the integer value of the levelName. @param levelName: The string value of the level name @type levelName: str @return: The value of the level name we are interested in. @rtype: int """ assert isinstance(levelName, str) and levelName in getLevelNames(), \ "Bad debug level name" return getLevelNames().index(levelName)+1 def getFormattedLevelName(level): assert isinstance(level, int) and level > 0 and level < 6, \ TypeError("Bad debug level") return _FORMATTED_LEVELS[level - 1] def registerCategory(category): """ Register a given category in the debug system. A level will be assigned to it based on previous calls to setDebug. """ # parse what level it is set to based on _DEBUG # example: *:2,admin:4 global _DEBUG global _levels global _categories level = 0 chunks = _DEBUG.split(',') for chunk in chunks: if not chunk: continue if ':' in chunk: spec, value = chunk.split(':') else: spec = '*' value = chunk # our glob is unix filename style globbing, so cheat with fnmatch # fnmatch.fnmatch didn't work for this, so don't use it if category in fnmatch.filter((category, ), spec): # we have a match, so set level based on string or int if not value: continue try: level = int(value) except ValueError: # e.g. *; we default to most level = 5 # store it _categories[category] = level def getCategoryLevel(category): """ @param category: string Get the debug level at which this category is being logged, adding it if it wasn't registered yet. """ global _categories if not category in _categories: registerCategory(category) return _categories[category] def setLogSettings(state): """Update the current log settings. This can restore an old saved log settings object returned by getLogSettings @param state: the settings to set """ global _DEBUG global _log_handlers global _log_handlers_limited (_DEBUG, categories, _log_handlers, _log_handlers_limited) = state for category in categories: registerCategory(category) def getLogSettings(): """Fetches the current log settings. The returned object can be sent to setLogSettings to restore the returned settings @returns: the current settings """ return (_DEBUG, _categories, _log_handlers, _log_handlers_limited) def _canShortcutLogging(category, level): if _log_handlers: # we have some loggers operating without filters, have to do # everything return False else: return level > getCategoryLevel(category) def scrubFilename(filename): ''' Scrub the filename to a relative path for all packages in our scrub list. ''' global _PACKAGE_SCRUB_LIST for package in _PACKAGE_SCRUB_LIST: i = filename.rfind(package) if i > -1: return filename[i:] return filename def getFileLine(where=-1): """ Return the filename and line number for the given location. If where is a negative integer, look for the code entry in the current stack that is the given number of frames above this module. If where is a function, look for the code entry of the function. @param where: how many frames to go back up, or function @type where: int (negative) or function @return: tuple of (file, line) @rtype: tuple of (str, int) """ co = None lineno = None if isinstance(where, types.FunctionType): co = where.func_code lineno = co.co_firstlineno elif isinstance(where, types.MethodType): co = where.im_func.func_code lineno = co.co_firstlineno else: stackFrame = sys._getframe() while stackFrame: co = stackFrame.f_code if not co.co_filename.endswith('log.py'): # wind up the stack according to frame while where < -1: stackFrame = stackFrame.f_back where += 1 co = stackFrame.f_code lineno = stackFrame.f_lineno break stackFrame = stackFrame.f_back if not co: return "", 0 return scrubFilename(co.co_filename), lineno def ellipsize(o): """ Ellipsize the representation of the given object. """ r = repr(o) if len(r) < 800: return r r = r[:60] + ' ... ' + r[-15:] return r def getFormatArgs(startFormat, startArgs, endFormat, endArgs, args, kwargs): """ Helper function to create a format and args to use for logging. This avoids needlessly interpolating variables. """ debugArgs = startArgs[:] for a in args: debugArgs.append(ellipsize(a)) for items in kwargs.items(): debugArgs.extend(items) debugArgs.extend(endArgs) debugFormat = startFormat \ + ', '.join(('%s', ) * len(args)) \ + (kwargs and ', ' or '') \ + ', '.join(('%s=%r', ) * len(kwargs)) \ + endFormat return debugFormat, debugArgs def doLog(level, object, category, format, args, where=-1, filePath=None, line=None): """ @param where: what to log file and line number for; -1 for one frame above log.py; -2 and down for higher up; a function for a (future) code object @type where: int or callable @param filePath: file to show the message as coming from, if caller knows best @type filePath: str @param line: line to show the message as coming from, if caller knows best @type line: int @return: dict of calculated variables, if they needed calculating. currently contains file and line; this prevents us from doing this work in the caller when it isn't needed because of the debug level """ ret = {} if args: message = format % args else: message = format # first all the unlimited ones if _log_handlers: if filePath is None and line is None: (filePath, line) = getFileLine(where=where) ret['filePath'] = filePath ret['line'] = line for handler in _log_handlers: try: handler(level, object, category, file, line, message) except TypeError, e: raise SystemError("handler %r raised a TypeError: %s" % ( handler, getExceptionMessage(e))) if level > getCategoryLevel(category): return ret if _log_handlers_limited: if filePath is None and line is None: (filePath, line) = getFileLine(where=where) ret['filePath'] = filePath ret['line'] = line for handler in _log_handlers_limited: # set this a second time, just in case there weren't unlimited # loggers there before try: handler(level, object, category, filePath, line, message) except TypeError: raise SystemError("handler %r raised a TypeError" % handler) return ret def errorObject(object, cat, format, *args): """ Log a fatal error message in the given category. This will also raise a L{SystemExit}. """ doLog(ERROR, object, cat, format, args) # we do the import here because having it globally causes weird import # errors if our gstreactor also imports .log, which brings in errors # and pb stuff if args: raise SystemExit(format % args) else: raise SystemExit(format) def warningObject(object, cat, format, *args): """ Log a warning message in the given category. This is used for non-fatal problems. """ doLog(WARN, object, cat, format, args) def infoObject(object, cat, format, *args): """ Log an informational message in the given category. """ doLog(INFO, object, cat, format, args) def debugObject(object, cat, format, *args): """ Log a debug message in the given category. """ doLog(DEBUG, object, cat, format, args) def logObject(object, cat, format, *args): """ Log a log message. Used for debugging recurring events. """ doLog(LOG, object, cat, format, args) def safeprintf(file, format, *args): """Write to a file object, ignoring errors. """ try: if args: file.write(format % args) else: file.write(format) except IOError, e: if e.errno == errno.EPIPE: # if our output is closed, exit; e.g. when logging over an # ssh connection and the ssh connection is closed os._exit(os.EX_OSERR) # otherwise ignore it, there's nothing you can do def stderrHandler(level, object, category, file, line, message): """ A log handler that writes to stderr. @type level: string @type object: string (or None) @type category: string @type message: string """ o = "" if object: o = '"' + object + '"' where = "(%s:%d)" % (file, line) # level pid object cat time # 5 + 1 + 7 + 1 + 32 + 1 + 17 + 1 + 15 == 80 safeprintf(sys.stderr, '%s [%5d] %-32s %-17s %-15s ', getFormattedLevelName(level), os.getpid(), o, category, time.strftime("%b %d %H:%M:%S")) safeprintf(sys.stderr, '%-4s %s %s\n', "", message, where) sys.stderr.flush() def _preformatLevels(noColorEnvVarName): format = '%-5s' try: import termcolor except ImportError: # we don't need to catch this if termcolor is in same package as # log.py termcolor = None if (noColorEnvVarName is not None and termcolor is not None and (noColorEnvVarName not in os.environ or not os.environ[noColorEnvVarName])): t = termcolor.TerminalController() formatter = lambda level: ''.join((t.BOLD, getattr(t, COLORS[level]), format % (_LEVEL_NAMES[level-1], ), t.NORMAL)) else: formatter = lambda level: format % (_LEVEL_NAMES[level-1], ) for level in ERROR, WARN, INFO, DEBUG, LOG: _FORMATTED_LEVELS.append(formatter(level)) ### "public" useful API # setup functions def init(envVarName, enableColorOutput=False): """ Initialize the logging system and parse the environment variable of the given name. Needs to be called before starting the actual application. """ global _initialized if _initialized: return global _ENV_VAR_NAME _ENV_VAR_NAME = envVarName if enableColorOutput: _preformatLevels(envVarName + "_NO_COLOR") else: _preformatLevels(None) if envVarName in os.environ: # install a log handler that uses the value of the environment var setDebug(os.environ[envVarName]) addLimitedLogHandler(stderrHandler) _initialized = True def setDebug(string): """Set the DEBUG string. This controls the log output.""" global _DEBUG global _ENV_VAR_NAME global _categories _DEBUG = string debug('log', "%s set to %s" % (_ENV_VAR_NAME, _DEBUG)) # reparse all already registered category levels for category in _categories: registerCategory(category) def getDebug(): """ Returns the currently active DEBUG string. @rtype: str """ global _DEBUG return _DEBUG def setPackageScrubList(*packages): """ Set the package names to scrub from filenames. Filenames from these paths in log messages will be scrubbed to their relative file path instead of the full absolute path. @type packages: list of str """ global _PACKAGE_SCRUB_LIST _PACKAGE_SCRUB_LIST = packages def reset(): """ Resets the logging system, removing all log handlers. """ global _log_handlers, _log_handlers_limited, _initialized _log_handlers = [] _log_handlers_limited = [] _initialized = False def addLogHandler(func): """ Add a custom log handler. @param func: a function object with prototype (level, object, category, message) where level is either ERROR, WARN, INFO, DEBUG, or LOG, and the rest of the arguments are strings or None. Use getLevelName(level) to get a printable name for the log level. @type func: a callable function @raises TypeError: if func is not a callable """ if not callable(func): raise TypeError("func must be callable") if func not in _log_handlers: _log_handlers.append(func) def addLimitedLogHandler(func): """ Add a custom log handler. @param func: a function object with prototype (level, object, category, message) where level is either ERROR, WARN, INFO, DEBUG, or LOG, and the rest of the arguments are strings or None. Use getLevelName(level) to get a printable name for the log level. @type func: a callable function @raises TypeError: TypeError if func is not a callable """ if not callable(func): raise TypeError("func must be callable") if func not in _log_handlers_limited: _log_handlers_limited.append(func) def removeLogHandler(func): """ Remove a registered log handler. @param func: a function object with prototype (level, object, category, message) where level is either ERROR, WARN, INFO, DEBUG, or LOG, and the rest of the arguments are strings or None. Use getLevelName(level) to get a printable name for the log level. @type func: a callable function @raises ValueError: if func is not registered """ _log_handlers.remove(func) def removeLimitedLogHandler(func): """ Remove a registered limited log handler. @param func: a function object with prototype (level, object, category, message) where level is either ERROR, WARN, INFO, DEBUG, or LOG, and the rest of the arguments are strings or None. Use getLevelName(level) to get a printable name for the log level. @type func: a callable function @raises ValueError: if func is not registered """ _log_handlers_limited.remove(func) # public log functions def error(cat, format, *args): errorObject(None, cat, format, *args) def warning(cat, format, *args): warningObject(None, cat, format, *args) def info(cat, format, *args): infoObject(None, cat, format, *args) def debug(cat, format, *args): debugObject(None, cat, format, *args) def log(cat, format, *args): logObject(None, cat, format, *args) # public utility functions def getExceptionMessage(exception, frame=-1, filename=None): """ Return a short message based on an exception, useful for debugging. Tries to find where the exception was triggered. """ stack = traceback.extract_tb(sys.exc_info()[2]) if filename: stack = [f for f in stack if f[0].find(filename) > -1] #import code; code.interact(local=locals()) (filename, line, func, text) = stack[frame] filename = scrubFilename(filename) exc = exception.__class__.__name__ msg = "" # a shortcut to extract a useful message out of most exceptions # for now if str(exception): msg = ": %s" % str(exception) return "exception %(exc)s at %(filename)s:%(line)s: %(func)s()%(msg)s" \ % locals() def reopenOutputFiles(): """ Reopens the stdout and stderr output files, as set by L{outputToFiles}. """ if not _stdout and not _stderr: debug('log', 'told to reopen log files, but log files not set') return def reopen(name, fileno, *args): oldmask = os.umask(0026) try: f = open(name, 'a+', *args) finally: os.umask(oldmask) os.dup2(f.fileno(), fileno) if _stdout: reopen(_stdout, sys.stdout.fileno()) if _stderr: reopen(_stderr, sys.stderr.fileno(), 0) debug('log', 'opened log %r', _stderr) def outputToFiles(stdout=None, stderr=None): """ Redirect stdout and stderr to named files. Records the file names so that a future call to reopenOutputFiles() can open the same files. Installs a SIGHUP handler that will reopen the output files. Note that stderr is opened unbuffered, so if it shares a file with stdout then interleaved output may not appear in the order that you expect. """ global _stdout, _stderr, _old_hup_handler _stdout, _stderr = stdout, stderr reopenOutputFiles() def sighup(signum, frame): info('log', "Received SIGHUP, reopening logs") reopenOutputFiles() if _old_hup_handler: info('log', "Calling old SIGHUP hander") _old_hup_handler(signum, frame) try: import signal except ImportError: debug('log', 'POSIX signals not supported, unable to install' ' SIGHUP handler') else: debug('log', 'installing SIGHUP handler') handler = signal.signal(signal.SIGHUP, sighup) if handler == signal.SIG_DFL or handler == signal.SIG_IGN: _old_hup_handler = None else: _old_hup_handler = handler # base class for loggable objects class Loggable: """ Base class for objects that want to be able to log messages with different level of severity. The levels are, in order from least to most: log, debug, info, warning, error. @cvar logCategory: Implementors can provide a category to log their messages under. """ logCategory = 'default' def writeMarker(self, marker, level): """ Sets a marker that written to the logs. Setting this marker to multiple elements at a time helps debugging. @param marker: A string write to the log. @type marker: str @param level: The log level. It can be log.WARN, log.INFO, log.DEBUG, log.ERROR or log.LOG. @type level: int """ # errorObject specifically raises, so treat it specially if level == ERROR: self.error('%s', marker) doLog(level, self.logObjectName(), self.logCategory, '%s', marker) def error(self, *args): """Log an error. By default this will also raise an exception.""" if _canShortcutLogging(self.logCategory, ERROR): return errorObject(self.logObjectName(), self.logCategory, *self.logFunction(*args)) def warning(self, *args): """Log a warning. Used for non-fatal problems.""" if _canShortcutLogging(self.logCategory, WARN): return warningObject(self.logObjectName(), self.logCategory, *self.logFunction(*args)) def info(self, *args): """Log an informational message. Used for normal operation.""" if _canShortcutLogging(self.logCategory, INFO): return infoObject(self.logObjectName(), self.logCategory, *self.logFunction(*args)) def debug(self, *args): """Log a debug message. Used for debugging.""" if _canShortcutLogging(self.logCategory, DEBUG): return debugObject(self.logObjectName(), self.logCategory, *self.logFunction(*args)) def log(self, *args): """Log a log message. Used for debugging recurring events.""" if _canShortcutLogging(self.logCategory, LOG): return logObject(self.logObjectName(), self.logCategory, *self.logFunction(*args)) def doLog(self, level, where, format, *args, **kwargs): """ Log a message at the given level, with the possibility of going higher up in the stack. @param level: log level @type level: int @param where: how many frames to go back from the last log frame; or a function (to log for a future call) @type where: int (negative), or function @param kwargs: a dict of pre-calculated values from a previous doLog call @return: a dict of calculated variables, to be reused in a call to doLog that should show the same location @rtype: dict """ if _canShortcutLogging(self.logCategory, level): return {} args = self.logFunction(*args) return doLog(level, self.logObjectName(), self.logCategory, format, args, where=where, **kwargs) def warningFailure(self, failure, swallow=True): """ Log a warning about a Twisted Failure. Useful as an errback handler: d.addErrback(self.warningFailure) @param swallow: whether to swallow the failure or not @type swallow: bool """ if _canShortcutLogging(self.logCategory, WARN): if swallow: return return failure warningObject(self.logObjectName(), self.logCategory, *self.logFunction(getFailureMessage(failure))) if not swallow: return failure def logFunction(self, *args): """Overridable log function. Default just returns passed message.""" return args def logObjectName(self): """Overridable object name function.""" # cheat pychecker for name in ['logName', 'name']: if hasattr(self, name): return getattr(self, name) return None # Twisted helper stuff # private stuff _initializedTwisted = False # make a singleton __theTwistedLogObserver = None def _getTheTwistedLogObserver(): # used internally and in test global __theTwistedLogObserver if not __theTwistedLogObserver: __theTwistedLogObserver = TwistedLogObserver() return __theTwistedLogObserver # public helper methods def getFailureMessage(failure): """ Return a short message based on L{twisted.python.failure.Failure}. Tries to find where the exception was triggered. """ exc = str(failure.type) msg = failure.getErrorMessage() if len(failure.frames) == 0: return "failure %(exc)s: %(msg)s" % locals() (func, filename, line, some, other) = failure.frames[-1] filename = scrubFilename(filename) return "failure %(exc)s at %(filename)s:%(line)s: %(func)s(): %(msg)s" \ % locals() def warningFailure(failure, swallow=True): """ Log a warning about a Failure. Useful as an errback handler: d.addErrback(warningFailure) @param swallow: whether to swallow the failure or not @type swallow: bool """ warning('', getFailureMessage(failure)) if not swallow: return failure def logTwisted(): """ Integrate twisted's logger with our logger. This is done in a separate method because calling this imports and sets up a reactor. Since we want basic logging working before choosing a reactor, we need to separate these. """ global _initializedTwisted if _initializedTwisted: return debug('log', 'Integrating twisted logger') # integrate twisted's logging with us from twisted.python import log as tlog # this call imports the reactor # that is why we do this in a separate method from twisted.spread import pb # we don't want logs for pb.Error types since they # are specifically raised to be handled on the other side observer = _getTheTwistedLogObserver() observer.ignoreErrors([pb.Error, ]) tlog.startLoggingWithObserver(observer.emit, False) _initializedTwisted = True # we need an object as the observer because startLoggingWithObserver # expects a bound method class TwistedLogObserver(Loggable): """ Twisted log observer that integrates with our logging. """ logCategory = "logobserver" def __init__(self): self._ignoreErrors = [] # Failure types def emit(self, eventDict): method = log # by default, lowest level edm = eventDict['message'] if not edm: if eventDict['isError'] and 'failure' in eventDict: f = eventDict['failure'] for failureType in self._ignoreErrors: r = f.check(failureType) if r: self.debug("Failure of type %r, ignoring" % failureType) return self.log("Failure %r" % f) method = debug # tracebacks from errors at debug level msg = "A twisted traceback occurred." if getCategoryLevel("twisted") < WARN: msg += " Run with debug level >= 2 to see the traceback." # and an additional warning warning('twisted', msg) text = f.getTraceback() safeprintf(sys.stderr, "\nTwisted traceback:\n") safeprintf(sys.stderr, text + '\n') elif 'format' in eventDict: text = eventDict['format'] % eventDict else: # we don't know how to log this return else: text = ' '.join(map(str, edm)) msgStr = " [%(system)s] %(text)s\n" % { 'system': eventDict['system'], 'text': text.replace("\n", "\n\t")} # because msgstr can contain %, as in a backtrace, make sure we # don't try to splice it method('twisted', msgStr) def ignoreErrors(self, *types): for failureType in types: self._ignoreErrors.append(failureType) def clearIgnores(self): self._ignoreErrors = [] moap-0.2.7/moap/extern/log/__init__.py0000664000076400007640000000000010775171236014541 00000000000000moap-0.2.7/moap/extern/Makefile.in0000664000076400007640000003110011220504524013703 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = moap/extern DIST_COMMON = $(command_PYTHON) $(log_PYTHON) $(moap_PYTHON) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(commanddir)" "$(DESTDIR)$(logdir)" \ "$(DESTDIR)$(moapdir)" commandPYTHON_INSTALL = $(INSTALL_DATA) logPYTHON_INSTALL = $(INSTALL_DATA) moapPYTHON_INSTALL = $(INSTALL_DATA) py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = *.py{c,o} command/*.py{c,o} log/*.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/extern moap_PYTHON = \ __init__.py logdir = $(PYTHONLIBDIR)/moap/extern/log log_PYTHON = \ log/__init__.py \ log/log.py commanddir = $(PYTHONLIBDIR)/moap/extern/command command_PYTHON = \ command/__init__.py \ command/command.py EXTRA_DIST = log/test_log.py command/test_command.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu moap/extern/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu moap/extern/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-commandPYTHON: $(command_PYTHON) @$(NORMAL_INSTALL) test -z "$(commanddir)" || $(MKDIR_P) "$(DESTDIR)$(commanddir)" @list='$(command_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(commandPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(commanddir)/$$f'"; \ $(commandPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(commanddir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(commanddir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(commanddir)" $$dlist; \ fi; \ else :; fi uninstall-commandPYTHON: @$(NORMAL_UNINSTALL) @list='$(command_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(commanddir)/$$f"; \ rm -f "$(DESTDIR)$(commanddir)/$${f}c"; \ rm -f "$(DESTDIR)$(commanddir)/$${f}o"; \ done install-logPYTHON: $(log_PYTHON) @$(NORMAL_INSTALL) test -z "$(logdir)" || $(MKDIR_P) "$(DESTDIR)$(logdir)" @list='$(log_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(logPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(logdir)/$$f'"; \ $(logPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(logdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(logdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(logdir)" $$dlist; \ fi; \ else :; fi uninstall-logPYTHON: @$(NORMAL_UNINSTALL) @list='$(log_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(logdir)/$$f"; \ rm -f "$(DESTDIR)$(logdir)/$${f}c"; \ rm -f "$(DESTDIR)$(logdir)/$${f}o"; \ done install-moapPYTHON: $(moap_PYTHON) @$(NORMAL_INSTALL) test -z "$(moapdir)" || $(MKDIR_P) "$(DESTDIR)$(moapdir)" @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(moapPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(moapdir)/$$f'"; \ $(moapPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(moapdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(moapdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(moapdir)" $$dlist; \ fi; \ else :; fi uninstall-moapPYTHON: @$(NORMAL_UNINSTALL) @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(moapdir)/$$f"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}c"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}o"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(commanddir)" "$(DESTDIR)$(logdir)" "$(DESTDIR)$(moapdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-commandPYTHON install-logPYTHON \ install-moapPYTHON install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-commandPYTHON uninstall-logPYTHON \ uninstall-moapPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-commandPYTHON install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-logPYTHON install-man \ install-moapPYTHON install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-commandPYTHON uninstall-logPYTHON \ uninstall-moapPYTHON # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/moap/extern/Makefile.am0000664000076400007640000000057410626006360013711 00000000000000CLEANFILES = *.py{c,o} command/*.py{c,o} log/*.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/extern moap_PYTHON = \ __init__.py logdir = $(PYTHONLIBDIR)/moap/extern/log log_PYTHON = \ log/__init__.py \ log/log.py commanddir = $(PYTHONLIBDIR)/moap/extern/command command_PYTHON = \ command/__init__.py \ command/command.py EXTRA_DIST = log/test_log.py command/test_command.py moap-0.2.7/moap/extern/command/0000777000076400007640000000000011220504670013345 500000000000000moap-0.2.7/moap/extern/command/test_command.py0000664000076400007640000000600711045266165016326 00000000000000# -*- Mode: Python; test-case-name: test_command -*- # vi:si:et:sw=4:sts=4:ts=4 # # Copyright (C) 2006,2007 Thomas Vander Stichele # 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 Street #330, Boston, MA 02111-1307, USA. import os import sys import tempfile import commands import unittest import StringIO import command class CommandTestCase(unittest.TestCase): def testCommandNoName(self): c = command.Command() self.assertEquals(c.name, "command") class FakeSubSubCommand(command.Command): description = "Fake subsubcommand" aliases = "fssc" class FakeSubCommand(command.Command): description = "Fake subcommand" subCommandClasses = [FakeSubSubCommand, ] class FakeCommand(command.Command): description = "Fake command" subCommandClasses = [FakeSubCommand, ] class FakeCommandTestCase(unittest.TestCase): def setUp(self): unittest.TestCase.setUp(self) self.out = StringIO.StringIO() self.err = StringIO.StringIO() self.c = FakeCommand(stdout=self.out, stderr=self.err) self.assertEquals(self.c.name, "fakecommand") def testHelpCommands(self): self.assertEquals(None, self.c.parse(['--help', ])) lookFor = "%s " % self.c.subCommands.keys()[0] self.failUnless(self.out.getvalue().find(lookFor) > -1, "out %r does not contain %s" % (self.out.getvalue(), lookFor)) def testNoCommand(self): ret = self.c.parse([]) self.assertEquals(ret, 1) self.failIf(self.out.getvalue(), "Should not get output") # It seems the F7 version uppercases the first letter, making it Usage out = self.err.getvalue() self.failUnless(out[1:].startswith('sage:'), "output %s does not start with U/usage" % out) class FakeSubCommandTestCase(unittest.TestCase): def setUp(self): unittest.TestCase.setUp(self) self.out = StringIO.StringIO() self.err = StringIO.StringIO() self.c = FakeSubCommand(stdout=self.out, stderr=self.err) self.assertEquals(self.c.name, "fakesubcommand") def testHelpCommands(self): self.assertEquals(None, self.c.parse(['--help', ])) lookFor = "%s " % self.c.subCommands.keys()[0] self.failUnless(self.out.getvalue().find(lookFor) > -1, "out %r does not contain %s" % (self.out.getvalue(), lookFor)) if __name__ == '__main__': unittest.main() moap-0.2.7/moap/extern/command/command.py0000664000076400007640000002502411205725026015261 00000000000000# -*- Mode: Python; test-case-name: test_command -*- # vi:si:et:sw=4:sts=4:ts=4 # This file is released under the standard PSF license. """ Command class. """ import optparse import sys class CommandHelpFormatter(optparse.IndentedHelpFormatter): """ I format the description as usual, but add an overview of commands after it if there are any, formatted like the options. """ _commands = None def addCommand(self, name, description): if self._commands is None: self._commands = {} self._commands[name] = description ### override parent method def format_description(self, description): # textwrap doesn't allow for a way to preserve double newlines # to separate paragraphs, so we do it here. blocks = description.split('\n\n') rets = [] for block in blocks: rets.append(optparse.IndentedHelpFormatter.format_description(self, block)) ret = "\n".join(rets) if self._commands: commandDesc = [] commandDesc.append("commands:") keys = self._commands.keys() keys.sort() length = 0 for key in keys: if len(key) > length: length = len(key) for name in keys: format = " %-" + "%d" % length + "s %s" commandDesc.append(format % (name, self._commands[name])) ret += "\n" + "\n".join(commandDesc) + "\n" return ret class CommandOptionParser(optparse.OptionParser): """ I parse options as usual, but I explicitly allow setting stdout so that our print_help() method (invoked by default with -h/--help) defaults to writing there. I also override exit() so that I can be used in interactive shells. @ivar help_printed: whether help was printed during parsing @ivar usage_printed: whether usage was printed during parsing """ help_printed = False usage_printed = False _stdout = sys.stdout def set_stdout(self, stdout): self._stdout = stdout def parse_args(self, args=None, values=None): self.help_printed = False self.usage_printed = False return optparse.OptionParser.parse_args(self, args, values) # we're overriding the built-in file, but we need to since this is # the signature from the base class __pychecker__ = 'no-shadowbuiltin' def print_help(self, file=None): # we are overriding a parent method so we can't do anything about file __pychecker__ = 'no-shadowbuiltin' if file is None: file = self._stdout file.write(self.format_help()) self.help_printed = True def print_usage(self, file=None): optparse.OptionParser.print_usage(self, file) self.usage_printed = True def exit(self, status=0, msg=None): if msg: sys.stderr.write(msg) class Command: """ I am a class that handles a command for a program. Commands can be nested underneath a command for further processing. @cvar name: name of the command, lowercase; defaults to the lowercase version of the class name @cvar aliases: list of alternative lowercase names recognized @type aliases: list of str @cvar usage: short one-line usage string; %command gets expanded to a sub-command or [commands] as appropriate. Don't specify the command name itself, it will be added automatically. If not set, defaults to name. @cvar summary: short one-line summary of the command @cvar description: longer paragraph explaining the command @cvar subCommands: dict of name -> commands below this command @type subCommands: dict of str -> L{Command} @cvar parser: the option parser used for parsing @type parser: L{optparse.OptionParser} """ name = None aliases = None usage = None summary = None description = None parentCommand = None subCommands = None subCommandClasses = None aliasedSubCommands = None parser = None def __init__(self, parentCommand=None, stdout=sys.stdout, stderr=sys.stderr): """ Create a new command instance, with the given parent. Allows for redirecting stdout and stderr if needed. This redirection will be passed on to child commands. """ if not self.name: self.name = str(self.__class__).split('.')[-1].lower() self.stdout = stdout self.stderr = stderr self.parentCommand = parentCommand # create subcommands if we have them self.subCommands = {} self.aliasedSubCommands = {} if self.subCommandClasses: for C in self.subCommandClasses: c = C(self, stdout=stdout, stderr=stderr) self.subCommands[c.name] = c if c.aliases: for alias in c.aliases: self.aliasedSubCommands[alias] = c # create our formatter and add subcommands if we have them formatter = CommandHelpFormatter() if self.subCommands: for name, command in self.subCommands.items(): formatter.addCommand(name, command.summary or command.description) # expand %command for the bottom usage usage = self.usage or '' if not usage: # if no usage, but subcommands, then default to showing that if self.subCommands: usage = "%command" # the main program name shouldn't get prepended, because %prog # already expands to the name if not usage.startswith('%prog'): usage = self.name + ' ' + usage if usage.find("%command") > -1: usage = usage.split("%command")[0] + '[command]' usages = [usage, ] # FIXME: abstract this into getUsage that takes an optional # parentCommand on where to stop recursing up # useful for implementing subshells # walk the tree up for our usage c = self.parentCommand while c: usage = c.usage or c.name if usage.find(" %command") > -1: usage = usage.split(" %command")[0] usages.append(usage) c = c.parentCommand usages.reverse() usage = " ".join(usages) # create our parser description = self.description or self.summary if description: description = description.strip() self.parser = CommandOptionParser( usage=usage, description=description, formatter=formatter) self.parser.set_stdout(self.stdout) self.parser.disable_interspersed_args() # allow subclasses to add options self.addOptions() def addOptions(self): """ Override me to add options to the parser. """ pass def do(self, args): """ Override me to implement the functionality of the command. """ pass def parse(self, argv): """ Parse the given arguments and act on them. @param argv: list of arguments to parse @type argv: list of str @rtype: int @returns: an exit code, or None if no actual action was taken. """ # note: no arguments should be passed as an empty list, not a list # with an empty str as ''.split(' ') returns self.options, args = self.parser.parse_args(argv) self.debug('parse_args called') # if we were asked to print help or usage, we are done if self.parser.usage_printed or self.parser.help_printed: return None # FIXME: make handleOptions not take options, since we store it # in self.options now ret = self.handleOptions(self.options) if ret: return ret # handle pleas for help if args and args[0] == 'help': self.debug('Asked for help, args %r' % args) # give help on current command if only 'help' is passed if len(args) == 1: self.outputHelp() return 0 # complain if we were asked for help on a subcommand, but we don't # have any if not self.subCommands: self.stderr.write('No subcommands defined.') self.parser.print_usage(file=self.stderr) self.stderr.write( "Use --help to get more information about this command.\n") return 1 # rewrite the args the other way around; # help doap becomes doap help so it gets deferred to the doap # command args = [args[1], args[0]] # if we don't have subcommands, defer to our do() method if not self.subCommands: ret = self.do(args) # if everything's fine, we return 0 if not ret: ret = 0 return ret # if we do have subcommands, defer to them try: command = args[0] except IndexError: self.parser.print_usage(file=self.stderr) self.stderr.write( "Use --help to get a list of commands.\n") return 1 if command in self.subCommands.keys(): return self.subCommands[command].parse(args[1:]) if self.aliasedSubCommands: if command in self.aliasedSubCommands.keys(): return self.aliasedSubCommands[command].parse(args[1:]) self.stderr.write("Unknown command '%s'.\n" % command) self.parser.print_usage(file=self.stderr) return 1 def handleOptions(self, options): """ Handle the parsed options. """ pass def outputHelp(self): """ Output help information. """ self.debug('outputHelp') self.parser.print_help(file=self.stderr) def outputUsage(self): """ Output usage information. Used when the options or arguments were missing or wrong. """ self.debug('outputUsage') self.parser.print_usage(file=self.stderr) def getRootCommand(self): """ Return the top-level command, which is typically the program. """ c = self while c.parentCommand: c = c.parentCommand return c def debug(self, format, *args): """ Override me to handle debug output from this class. """ pass moap-0.2.7/moap/extern/command/__init__.py0000664000076400007640000000000010615600146015364 00000000000000moap-0.2.7/moap/extern/__init__.py0000664000076400007640000000000010610224320013735 00000000000000moap-0.2.7/moap/Makefile.am0000664000076400007640000000024310626006361012376 00000000000000CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap moap_PYTHON = \ __init__.py \ main.py SUBDIRS = extern bug command configure doap publish util vcs test moap-0.2.7/moap/vcs/0000777000076400007640000000000011220504670011215 500000000000000moap-0.2.7/moap/vcs/cvs.py0000664000076400007640000000622511044572704012314 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 """ CVS functionality. """ import os import re import commands import vcs from moap.util import util def detect(path): """ Detect which version control system is being used in the source tree. @return: True if the given path looks like a CVS tree. """ if not os.path.exists(os.path.join(path, 'CVS')): return False for n in ['Entries', 'Repository', 'Root']: if not os.path.exists(os.path.join(path, 'CVS', n)): return False return True class CVS(vcs.VCS): name = 'CVS' def getUnknown(self, path): ret = [] oldPath = os.getcwd() # FIXME: the only way I know of to get the list of unignored files # is to do cvs update, which of course has a side effect os.chdir(path) cmd = "cvs update" output = commands.getoutput(cmd) lines = output.split("\n") matcher = re.compile('^\?\s+(.*)') for l in lines: m = matcher.search(l) if m: path = m.expand("\\1") ret.append(path) # FIXME: would be nice to sort per directory os.chdir(oldPath) return ret def ignore(self, paths, commit=True): # cvs ignores entries by appending to a .cvsignore file in the parent oldPath = os.getcwd() os.chdir(self.path) tree = self.createTree(paths) toCommit = [] for path in tree.keys(): # this does the right thing if path == '' cvsignore = os.path.join(path, '.cvsignore') toCommit.append(cvsignore) new = False if not os.path.exists(cvsignore): new = True handle = open(cvsignore, "a") for child in tree[path]: handle.write('%s\n' % child) handle.close() if new: cmd = "cvs add %s" % cvsignore os.system(cmd) # FIXME: also commit .cvsignore flies when done. Should we make # this part of the interface ? if commit and toCommit: cmd = "cvs commit -m 'moap ignore' %s" % " ".join(toCommit) os.system(cmd) os.chdir(oldPath) def commit(self, paths, message): oldPath = os.getcwd() os.chdir(self.path) temp = util.writeTemp([message, ]) cmd = "cvs commit -F %s %s" % (temp, " ".join(paths)) os.system(cmd) os.unlink(temp) os.chdir(oldPath) def diff(self, path): oldPath = os.getcwd() os.chdir(self.path) # CVS does not like running cvs diff with an absolute path if path.startswith(self.path): path = path[len(self.path) + 1:] # Don't want "Diffing ..." output, and 3 lines of context cmd = "cvs -q diff -u3 -N %s" % path self.debug('Running command %s' % cmd) output = commands.getoutput(cmd) os.chdir(oldPath) return output def update(self, path): cmd = "cvs update %s" % path status, output = commands.getstatusoutput(cmd) return output VCSClass = CVS moap-0.2.7/moap/vcs/darcs.py0000664000076400007640000001306011220253273012601 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_vcs_darcs -*- # vi:si:et:sw=4:sts=4:ts=4 """ Darcs functionality. """ import os import commands import re from moap.util import util, log from moap.vcs import vcs def detect(path): """ Detect if the given source tree is using Darcs. @return: True if the given path looks like a Darcs tree. """ # for darcs, we may have to walk up directories # see http://www.darcs.net/manual/node9.html if not os.path.exists(os.path.join(path, '_darcs')): log.debug('darcs', 'Did not find _darcs directory under %s' % path) return False # some paths I found after an initialize and get for n in ['inventories', 'prefs']: if not os.path.exists(os.path.join(path, '_darcs', n)): log.debug('darcs', 'Did not find _darcs/%s under %s' % (n, path)) return False return True class Darcs(vcs.VCS): name = 'Darcs' def getUnknown(self, path): # darcs has "query manifest" to list version-controlled files, # and a toplevel .darcs-boring file listing comments and regexps oldPath = os.getcwd() versioned = [] # output of this command starts with ./, filter that out cmd = "darcs query manifest --repodir=%s" % path output = commands.getoutput(cmd) for line in output.split("\n"): versioned.append(line[1 + len(os.path.sep):]) self.debug('%d versioned files' % len(versioned)) allFiles = [] def walker(allFiles, dirname, fnames): if not dirname.startswith(self.path): fnames = [] return reldirname = dirname[len(os.path.join(self.path, '')):] # copy fnames so we can remove from it safely for fname in fnames[:]: # ignore _darcs directory in toplevel if dirname == self.path and fname == "_darcs": fnames.remove(fname) continue # darcs doesn't list directories as part of manifest if not os.path.isdir(os.path.join(dirname, fname)): allFiles.append(os.path.join(reldirname, fname)) os.path.walk(self.path, walker, allFiles) self.debug('%d total files' % len(allFiles)) boringPath = os.path.join(self.path, '.darcs-boring') boringRegExps = [] if os.path.exists(boringPath): boringRegExps = open(boringPath).readlines() unversioned = [n for n in allFiles if n not in versioned] self.debug('%d unversioned files' % len(unversioned)) # now filter out based on the regexps boring = [] for exp in boringRegExps: exp = exp.rstrip() if not exp: continue if exp.startswith('#'): continue matcher = re.compile(exp) for name in unversioned: if matcher.match(name): boring.append(name) unignored = [n for n in unversioned if n not in boring] self.debug('%d unignored files' % len(unignored)) os.chdir(oldPath) return unignored def ignore(self, paths, commit=True): if not paths: return # FIXME: darcs allows regexp style, maybe our ignore should too self.debug('ignoring %d paths' % len(paths)) oldPath = os.getcwd() os.chdir(self.path) boring = os.path.join(self.path, '.darcs-boring') addBoring = not os.path.exists(boring) handle = open(boring, "a") self.debug('adding %d paths to %s' % (len(paths), boring)) for path in paths: handle.write('%s\n' % path) handle.close() # FIXME: we should check if it is tracked, not if it exists; # someone can have created it without adding it if addBoring: cmd = "darcs add .darcs-boring" self.debug('Executing %s' % cmd) os.system(cmd) if commit: cmd = "darcs record -am 'moap ignore' .darcs-boring" self.debug('Executing %s' % cmd) os.system(cmd) os.chdir(oldPath) def commit(self, paths, message): # again, to commit, we need to be in the working directory # paths are absolute, so scrub them oldPath = os.getcwd() os.chdir(self.path) temp = util.writeTemp([message, ]) cmd = "darcs record -a --logfile=%s %s" % ( temp, " ".join(paths)) self.debug('running %s' % cmd) status = os.system(cmd) os.unlink(temp) os.chdir(oldPath) if status != 0: return False return True def diff(self, path): # darcs diff only works when in the working directory oldPath = os.getcwd() os.chdir(path) cmd = "darcs diff --unified" self.debug('Running %s' % cmd) output = commands.getoutput(cmd) os.chdir(oldPath) return output def getFileMatcher(self): return re.compile('^diff -rN -u old-.*/(\S+)$') def update(self, path): # FIXME: I don't see a way to pull just updates to the given path cmd = "darcs pull %s" % self.path status, output = commands.getstatusoutput(cmd) code = os.WEXITSTATUS(status) if code not in (0, 2): # darcs pull returns error code 2 when # darcs failed: No default repository to pull from, please specify # one # we let it pass raise vcs.VCSException(output) return output VCSClass = Darcs moap-0.2.7/moap/vcs/bzr.py0000664000076400007640000000421611154046657012321 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_vcs_bzr -*- # vi:si:et:sw=4:sts=4:ts=4 """ Bazaar functionality. """ import os import commands import re from moap.util import util, log from moap.vcs import vcs def detect(path): """ Detect if the given source tree is using Bazaar. @return: True if the given path looks like a Bazaar tree. """ while path and path != '/': if (os.path.exists(os.path.join(path, '.bzr')) and os.path.exists(os.path.join(path, '.bzr', 'checkout'))): return True path = os.path.dirname(path) return False class Bzr(vcs.VCS): name = 'Bazaar' def getUnknown(self, path): oldPath = os.getcwd() os.chdir(path) result = commands.getoutput("bzr unknowns").split('\n') # one empty line does not a return value make if result and result == ['']: result = [] os.chdir(oldPath) return result def ignore(self, paths, commit=True): if not paths: return oldPath = os.getcwd() os.chdir(self.path) self.debug("Ignoring %d paths" % len(paths)) cmd = "bzr ignore %s" % " ".join(paths) self.debug("Running %s" % cmd) os.system(cmd) if commit: self.commit([os.path.join(self.path, '.bzrignore'), ], 'moap ignore') os.chdir(oldPath) def commit(self, paths, message): try: oldPath = os.getcwd() os.chdir(self.path) temp = util.writeTemp([message, ]) os.system("bzr commit --file %s %s" % (temp, " ".join(paths))) os.unlink(temp) finally: os.chdir(oldPath) def diff(self, path): output = commands.getoutput("bzr diff %s" % path) return output def getFileMatcher(self): return re.compile(r'^\+\+\+ ([^\t]+)\t.*$') def update(self, path): # FIXME: No way to pull just updates to the given path status, output = commands.getstatusoutput("bzr pull") if status != 0: raise vcs.VCSException(output) return output VCSClass = Bzr moap-0.2.7/moap/vcs/git_svn.py0000664000076400007640000000260511154034675013172 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_vcs_git_svn -*- # vi:si:et:sw=4:sts=4:ts=4 """ git-svn functionality. """ import os import commands import re from moap.util import util, log from moap.vcs import vcs, git def detect(path): """ Detect if the given source tree is using git-svn. @return: True if the given path looks like a git-svn tree. """ while path and path != '/': if (os.path.exists(os.path.join(path, '.git')) and os.path.exists(os.path.join(path, '.git', 'description')) and os.path.exists(os.path.join(path, '.git', 'svn'))): return True path = os.path.dirname(path) return False class GitSvn(git.Git): name = 'git-svn' def getUnknown(self, path): return git.Git.getUnknown(self, path) def update(self, path): oldPath = os.getcwd() os.chdir(self.path) status, output = commands.getstatusoutput("git svn fetch") if status != 0: raise vcs.VCSException(output) status, output = commands.getstatusoutput("git merge remotes/git-svn") if status != 0: raise vcs.VCSException(output) status, output = commands.getstatusoutput("git svn show-ignore >> .git/info/exclude") if status != 0: raise vcs.VCSException(output) os.chdir(oldPath) return output VCSClass = GitSvn moap-0.2.7/moap/vcs/Makefile.in0000664000076400007640000002400611220504525013201 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = moap/vcs DIST_COMMON = $(moap_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(moapdir)" moapPYTHON_INSTALL = $(INSTALL_DATA) py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/vcs moap_PYTHON = \ __init__.py \ bzr.py \ cvs.py \ darcs.py \ git.py \ git_svn.py \ svn.py \ vcs.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu moap/vcs/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu moap/vcs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-moapPYTHON: $(moap_PYTHON) @$(NORMAL_INSTALL) test -z "$(moapdir)" || $(MKDIR_P) "$(DESTDIR)$(moapdir)" @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(moapPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(moapdir)/$$f'"; \ $(moapPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(moapdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(moapdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(moapdir)" $$dlist; \ fi; \ else :; fi uninstall-moapPYTHON: @$(NORMAL_UNINSTALL) @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(moapdir)/$$f"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}c"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}o"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(moapdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-moapPYTHON install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-moapPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-moapPYTHON install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-moapPYTHON # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/moap/vcs/svn.py0000664000076400007640000001746111220252733012324 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_vcs_svn -*- # vi:si:et:sw=4:sts=4:ts=4 """ SVN functionality. """ import os import commands import re from moap.util import util, log from moap.vcs import vcs def detect(path): """ Detect if the given source tree is using svn. @return: True if the given path looks like a Subversion tree. """ if not os.path.exists(os.path.join(path, '.svn')): log.debug('svn', 'Did not find .svn directory under %s' % path) return False for n in ['props', 'text-base']: if not os.path.exists(os.path.join(path, '.svn', n)): log.debug('svn', 'Did not find .svn/%s under %s' % (n, path)) return False return True class SVN(vcs.VCS): name = 'Subversion' meta = ['.svn'] def _getByStatus(self, path, status): """ @param status: one character indicating the status we want to get all paths for. """ ret = [] # ? should be escaped if status == '?': status = '\?' oldPath = os.getcwd() os.chdir(path) cmd = "svn status --no-ignore" output = commands.getoutput(cmd) lines = output.split("\n") matcher = re.compile('^' + status + '\s+(.*)') for l in lines: m = matcher.search(l) if m: relpath = m.expand("\\1") ret.append(relpath) # FIXME: would be nice to sort per directory os.chdir(oldPath) return ret def getAdded(self, path): return self._getByStatus(path, 'A') def getDeleted(self, path): return self._getByStatus(path, 'D') def getIgnored(self, path): return self._getByStatus(path, 'I') def getUnknown(self, path): return self._getByStatus(path, '?') def ignore(self, paths, commit=True): oldPath = os.getcwd() os.chdir(self.path) # svn ignores files by editing the svn:ignore property on the parent tree = self.createTree(paths) toCommit = [] for path in tree.keys(): # read in old property cmd = "svn propget svn:ignore %s" % path (status, output) = commands.getstatusoutput(cmd) lines = output.split("\n") # svn 1.3.1 (r19032) # $ svn propset svn:ignore --file - . # svn: Reading from stdin is currently broken, so disabled temp = util.writeTemp(lines + tree[path]) # svn needs to use "." for the base directory if path == '': path = '.' toCommit.append(path) cmd = "svn propset svn:ignore --file %s %s" % (temp, path) os.system(cmd) os.unlink(temp) if commit and toCommit: cmd = "svn commit -m 'moap ignore' -N %s" % " ".join(toCommit) os.system(cmd) os.chdir(oldPath) def commit(self, paths, message): # get all the parents as well parents = [] for p in paths: while p: p = os.path.dirname(p) if p: parents.append(p) paths.extend(parents) temp = util.writeTemp([message, ]) paths = [os.path.join(self.path, p) for p in paths] cmd = "svn commit --non-recursive --file %s %s" % ( temp, " ".join(paths)) log.debug('svn', 'Executing command: %s' % cmd) status = os.system(cmd) os.unlink(temp) if status != 0: return False return True def diff(self, path): # the diff can also contain svn-specific property changes # we need to filter them to be a normal unified diff # These blocks are recognizable because they go # newline - Property changes on: - stuff - newline # We parse in the C locale so we need to set it - see ticket #266 oldPath = os.getcwd() os.chdir(self.path) cmd = "LANG=C svn diff %s" % path output = commands.getoutput(cmd) os.chdir(oldPath) return self.scrubPropertyChanges(output) def scrubPropertyChanges(self, output): """ Scrub the given diff output from property changes. """ reo = re.compile( '^$\n' # starting empty line '^Property changes on:.*?$\n' # Property changes line, non-greedy '.*?' # all the other lines, non-greedy '^$\n', # ending empty line re.MULTILINE | re.DOTALL) # make sure we do multi-line return reo.sub('', output) def getPropertyChanges(self, path): ret = {} cmd = "LANG=C svn diff %s" % path # we add a newline so we can match each Property changes block by # having it end on a newline, including the last block output = commands.getoutput(cmd) + '\n' # match Property changes blocks reo = re.compile( 'Property changes on: (.*?)$\n' # Property changes line, non-greedy '^_*$\n' # Divider line '^(\w*: .*?' # Property name block, non-greedy '(?:Property)?)' # and stop at a possible next block '^$\n' # and end on empty line , re.MULTILINE | re.DOTALL) # make sure we do multi-line # match Name: blocks within a file's property changes reop = re.compile( '^\w*: (.*?)\n' # Property name block, non-greedy , re.MULTILINE | re.DOTALL) # make sure we do multi-line fileMatches = reo.findall(output) for path, properties in fileMatches: ret[path] = reop.findall(properties) return ret def update(self, path): cmd = "svn update %s" % path status, output = commands.getstatusoutput(cmd) if status != 0: raise vcs.VCSException(output) return output def getCheckoutCommands(self): ret = [] oldPath = os.getcwd() os.chdir(self.path) # FIXME: what if some files are at a different revision ? cmd = "svn info %s" % self.path status, output = commands.getstatusoutput(cmd) if status != 0: raise vcs.VCSException(output) lines = output.split('\n') url = None baseRevision = None for line in lines: if line.startswith('URL: '): url = line[4:] if line.startswith('Revision: '): baseRevision = int(line[10:]) ret.append( 'svn checkout --non-interactive --revision %d %s checkout\n' % ( baseRevision, url)) # now check all paths that are at a different revision than the base # one cmd = "svn status -v" status, output = commands.getstatusoutput(cmd) if status != 0: raise vcs.VCSException(output) lines = output.split('\n') matcher = re.compile('.{8}' # first 8 status columns '\s+(\d+)' # current revision '\s+(\d+)' # last commited version '\s+(\w+)' # last committer '\s+(.*)' # working copy path ) # FIXME: group same revisions for a speedup for line in lines: m = matcher.search(line) if m: revision = int(m.expand("\\1")) path = m.expand("\\4") if revision != baseRevision: ret.append('svn update --non-interactive --non-recursive ' '--revision %d %s' % ( revision, os.path.join('checkout', path))) os.chdir(oldPath) return "\n".join(ret) + ('\n') VCSClass = SVN moap-0.2.7/moap/vcs/Makefile.am0000664000076400007640000000024510653274704013203 00000000000000CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/vcs moap_PYTHON = \ __init__.py \ bzr.py \ cvs.py \ darcs.py \ git.py \ git_svn.py \ svn.py \ vcs.py moap-0.2.7/moap/vcs/git.py0000664000076400007640000000736411220416754012307 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_vcs_git -*- # vi:si:et:sw=4:sts=4:ts=4 """ Git functionality. """ import os import commands import re from moap.util import util, log from moap.vcs import vcs def detect(path): """ Detect if the given source tree is using Git. @return: True if the given path looks like a Git tree. """ while path and path != '/': if (os.path.exists(os.path.join(path, '.git')) and os.path.exists(os.path.join(path, '.git', 'description')) and (not os.path.exists(os.path.join(path, '.git', 'svn')))): return True path = os.path.dirname(path) return False class Git(vcs.VCS): name = 'Git' def getUnknown(self, path): oldPath = os.getcwd() os.chdir(path) # doing an ls-files with --others does not look at .gitignore # unless you tell it to result = commands.getoutput( "git ls-files --others --exclude-per-directory=.gitignore").split( '\n') # one empty line does not a return value make if result and result == ['']: result = [] os.chdir(oldPath) return result def ignore(self, paths, commit=True): # git ignores entries by appending to a .gitignore file in the parent oldPath = os.getcwd() os.chdir(self.path) tree = self.createTree(paths) toCommit = [] for path in tree.keys(): # this does the right thing if path == '' gitignore = os.path.join(path, '.gitignore') toCommit.append(gitignore) handle = open(gitignore, "a") for child in tree[path]: handle.write('%s\n' % child) handle.close() # FIXME: also commit .gitignore files when done. Should we make # this part of the interface ? self.commit(toCommit, 'moap ignore') os.chdir(oldPath) def commit(self, paths, message): try: oldPath = os.getcwd() os.chdir(self.path) self.debug('Committing paths %r' % paths) cmd = "git add %s" % " ".join(paths) self.debug("Running %s" % cmd) status, output = commands.getstatusoutput(cmd) if status != 0: raise vcs.VCSException(output) temp = util.writeTemp([message, ]) cmd = "git commit -F %s %s" % (temp, " ".join(paths)) self.debug("Running %s" % cmd) status, output = commands.getstatusoutput(cmd) os.unlink(temp) if status != 0: raise vcs.VCSException(output) finally: os.chdir(oldPath) def diff(self, path): oldPath = os.getcwd() os.chdir(self.path) # to do a diff, git needs relative paths, relative to the root if path.startswith(self.path): path = path[len(self.path):] if not path: path = "." self.debug('frobnicated path to %s' % path) cmd = "git diff --cached -- %s" % path self.debug("Running %s" % cmd) output = commands.getoutput(cmd) os.chdir(oldPath) return output def getFileMatcher(self): # example: diff --git a/t b/t return re.compile(r'^diff --git a/(\S+) b') def update(self, path): oldPath = os.getcwd() os.chdir(self.path) # FIXME: No way to pull just updates to the given path; so update # the whole checkout cmd = "git pull" self.debug("Running %s" % cmd) status, output = commands.getstatusoutput(cmd) os.chdir(oldPath) if status != 0: raise vcs.VCSException(output) return output VCSClass = Git moap-0.2.7/moap/vcs/vcs.py0000664000076400007640000004163711220444044012311 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 """ Version Control System functionality. """ import re import os import sys import glob import tarfile import tempfile import commands from moap.util import util, log def getNames(): """ Returns a sorted list of VCS names that moap can work with. """ moduleNames = util.getPackageModules('moap.vcs', ignore=['vcs', ]) modules = [util.namedModule('moap.vcs.%s' % s) for s in moduleNames] names = [m.VCSClass.name for m in modules] names.sort() return names def detect(path=None): """ Detect which version control system is being used in the source tree. @returns: an instance of a subclass of L{VCS}, or None. """ log.debug('vcs', 'detecting VCS in %s' % path) if not path: path = os.getcwd() systems = util.getPackageModules('moap.vcs', ignore=['vcs', ]) log.debug('vcs', 'trying vcs modules %r' % systems) for s in systems: m = util.namedModule('moap.vcs.%s' % s) try: ret = m.detect(path) except AttributeError: sys.stderr.write('moap.vcs.%s is missing detect()\n' % s) continue if ret: try: o = m.VCSClass(path) except AttributeError: sys.stderr.write('moap.vcs.%s is missing VCSClass()\n' % s) continue log.debug('vcs', 'detected VCS %s' % s) return o log.debug('vcs', 'did not find %s' % s) return None # FIXME: add stdout and stderr, so all spawned commands output there instead class VCS(log.Loggable): """ @ivar path: the path to the top of the source tree @ivar meta: paths that contain VCS metadata @type meta: list of str """ name = 'Some Version Control System' logCategory = 'VCS' path = None meta = None def __init__(self, path=None): self.path = path if not path: self.path = os.getcwd() def getAdded(self, path): """ Get a list of paths newly added under the given path and relative to it. @param path: the path under which to check for files @type path: str @returns: list of paths @rtype: list of str """ log.info('vcs', "subclass %r should implement getAdded" % self.__class__) def getDeleted(self, path): """ Get a list of deleted paths under the given path and relative to it. @param path: the path under which to check for files @type path: str @returns: list of paths @rtype: list of str """ log.info('vcs', "subclass %r should implement getDeleted" % self.__class__) def getIgnored(self, path): """ Get a list of ignored paths under the given path and relative to it. @param path: the path under which to check for files @type path: str @returns: list of paths @rtype: list of str """ raise NotImplementedError, \ 'subclass %s should implement getIgnored' % self.__class__ def getUnknown(self, path): """ Get a list of unknown paths under the given path and relative to it. @param path: the path under which to check for files @type path: str @returns: list of paths @rtype: list of str """ raise NotImplementedError, \ 'subclass %s should implement getUnknown' % self.__class__ def ignore(self, paths, commit=True): """ Make the VCS ignore the given list of paths. @param paths: list of paths, relative to the checkout directory @type paths: list of str @param commit: if True, commit the ignore updates. @type commit: boolean """ raise NotImplementedError, \ 'subclass %s should implement ignore' % self.__class__ def commit(self, paths, message): """ Commit the given list of paths, with the given message. Note that depending on the VCS, parents that were just added may need to be commited as well. @type paths: list @type message: str @rtype: bool """ def createTree(self, paths): """ Given the list of paths, create a dict of parentPath -> [child, ...] If the path is in the root of the repository, parentPath will be '' @rtype: dict of str -> list of str """ result = {} if not paths: return result for p in paths: # os.path.basename('test/') returns '', so strip possibly trailing / if p.endswith(os.path.sep): p = p[:-1] base = os.path.basename(p) dirname = os.path.dirname(p) if not dirname in result.keys(): result[dirname] = [] result[dirname].append(base) return result def diff(self, path): """ Return a diff for the given path. The diff should not end in a newline; an empty diff should be an empty string. The diff should also be relative to the working directory; no absolute paths. @rtype: str @returns: the diff """ raise NotImplementedError, \ 'subclass %s should implement diff' % self.__class__ def getFileMatcher(self): """ Return an re matcher object that will expand to the file being changed. The default implementation works for CVS and SVN. """ return re.compile('^Index: (\S+)$') def getChanges(self, path, diff=None): """ Get a list of changes for the given path and subpaths. @type diff: str @param diff: the diff to use instead of a local vcs diff (only useful for testing) @returns: dict of path -> list of (oldLine, oldCount, newLine, newCount) """ if not diff: self.debug('getting changes from diff in %s' % path) diff = self.diff(path) changes = {} fileMatcher = self.getFileMatcher() # cvs diff can put a function name after the final @@ pair # svn diff on a one-line change in a one-line file looks like this: # @@ -1 +1 @@ changeMatcher = re.compile( '^\@\@\s+' # start of line '(-)(\d+),?(\d*)' # -x,y or -x '\s+' '(\+)(\d+),?(\d*)' '\s+\@\@' # end of line ) # We rstrip so that we don't end up with a dangling '' line lines = diff.rstrip('\n').split("\n") self.debug('diff is %d lines' % len(lines)) for i in range(len(lines)): fm = fileMatcher.search(lines[i]) if fm: # found a file being diffed, now get changes path = fm.expand('\\1') self.debug('Found file %s with deltas on line %d' % ( path, i + 1)) changes[path] = [] i += 1 while i < len(lines) and not fileMatcher.search(lines[i]): self.log('Looking at line %d for file match' % (i + 1)) m = changeMatcher.search(lines[i]) if m: self.debug('Found change on line %d' % (i + 1)) oldLine = int(m.expand('\\2')) # oldCount can be missing, which means it's 1 c = m.expand('\\3') if not c: c = '1' oldCount = int(c) newLine = int(m.expand('\\5')) c = m.expand('\\6') if not c: c = '1' newCount = int(c) i += 1 # the diff has 3 lines of context by default # if a line was added/removed at the beginning or end, # that context is not always there # so we need to parse each non-changeMatcher line block = [] while i < len(lines) \ and not changeMatcher.search(lines[i]) \ and not fileMatcher.search(lines[i]): block.append(lines[i]) i += 1 # now we have the whole block self.log('Found change block of %d lines at line %d' % ( len(block), i - len(block) + 1)) for line in block: # starting non-change lines add to Line and # subtract from Count if line[0] == ' ': oldLine += 1 newLine += 1 oldCount -= 1 newCount -= 1 else: break block.reverse() for line in block: # trailing non-change lines subtract from Count # line can be empty if line and line[0] == ' ': oldCount -= 1 newCount -= 1 else: break changes[path].append( (oldLine, oldCount, newLine, newCount)) # we're at a change line, so go back i -= 1 i += 1 log.debug('vcs', '%d files changed' % len(changes.keys())) return changes def getPropertyChanges(self, path): """ Get a list of property changes for the given path and subpaths. These are metadata changes to files, not content changes. @rtype: dict of str -> list of str @returns: dict of path -> list of property names """ log.info('vcs', "subclass %r should implement getPropertyChanges" % self.__class__) def update(self, path): """ Update the given path to the latest version. """ raise NotImplementedError, \ 'subclass %s should implement update' % self.__class__ def getCheckoutCommands(self): """ Return shell commands necessary to do a fresh checkout of the current checkout into a directory called 'checkout'. @returns: newline-terminated string of commands. @rtype: str """ raise NotImplementedError, \ 'subclass %s should implement getCheckoutCommands' % self.__class__ def backup(self, archive): """ Back up the given VCS checkout into an archive. This stores all unignored files, as well as a checkout command and a diff, so the working directory can be fully restored. The archive will contain: - a subdirectory called unignored - a file called diff - an executable file called checkout.sh @raises VCSBackupException: if for some reason it can't guarantee a correct backup """ mode = 'w:' if archive.endswith('.gz'): mode = 'w:gz' if archive.endswith('.bz2'): mode = 'w:bz2' # P2.4 # Pre-2.5, tarfile has a bug, creating hardlinks for temporary files # if the temporary files get deleted right after adding. # See http://mail.python.org/pipermail/python-bugs-list/2005-October/030793.html # the workaround chosen is to keep the temporary files until after # closing tar = tarfile.TarFile.open(name=archive, mode=mode) # store the diff (fd, diffpath) = tempfile.mkstemp(prefix='moap.backup.diff.') diff = self.diff('') if diff: os.write(fd, diff + '\n') os.close(fd) tar.add(diffpath, arcname='diff') # store the checkout commands (fd, checkoutpath) = tempfile.mkstemp(prefix='moap.backup.checkout.') os.write(fd, "#!/bin/sh\n" + self.getCheckoutCommands()) os.close(fd) os.chmod(checkoutpath, 0755) tar.add(checkoutpath, arcname='checkout.sh') # store the unignored files tar.add(self.path, 'unignored', recursive=False) unignoreds = self.getUnknown(self.path) for rel in unignoreds: abspath = os.path.join(self.path, rel) self.debug('Adding unignored path %s', rel) tar.add(abspath, 'unignored/' + rel) tar.close() os.unlink(diffpath) os.unlink(checkoutpath) # now verify the backup restoreDir = tempfile.mkdtemp(prefix="moap.test.restore.") os.rmdir(restoreDir) self.restore(archive, restoreDir) diff = self.diffCheckout(restoreDir) if diff: msg = "Unexpected diff output between %s and %s:\n%s" % ( self.path, restoreDir, diff) self.debug(msg) raise VCSBackupException(msg) else: self.debug('No important difference between ' 'extracted archive and original directory') os.system('rm -rf %s' % restoreDir) def restore(self, archive, path): """ Restore from the given archive to the given path. """ self.debug('Restoring from archive %s to path %s' % ( archive, path)) if os.path.exists(path): raise VCSException('path %s already exists') oldPath = os.getcwd() # P2.3: tarfile.extractall only exists since 2.5 tar = tarfile.TarFile.open(name=archive) try: tar.extractall(path) except AttributeError: # do it the shell way self.debug('Restoring by using tar directly') os.system('mkdir -p %s' % path) if archive.endswith('.gz'): os.system('cd %s; tar xzf %s' % (path, archive)) elif archive.endswith('.bz2'): os.system('cd %s; tar xjf %s' % (path, archive)) else: raise AssertionError("Don't know how to handle %s" % archive) # start with the checkout os.chdir(path) status, output = commands.getstatusoutput('./checkout.sh') if status: raise VCSException('checkout failed with status %r: %r' % ( status, output)) os.unlink('checkout.sh') # apply the diff os.chdir('checkout') # FIXME: check errors ? os.system('patch -p0 < ../diff > /dev/null') os.chdir('..') os.unlink('diff') # move to parent directory # FIXME: make sure we handle . directories (like .svn) for path in glob.glob('checkout/*') + glob.glob('checkout/.*'): os.rename(path, os.path.basename(path)) os.rmdir('checkout') # move all unignored files to parent directory # FIXME: make sure we handle . directories (like .svn) for path in glob.glob('unignored/*') + glob.glob('unignored/.*'): # there is no good equivalent to mv; # os.rename doesn't work on trees # shutil.move actually invokes copytree cmd = 'mv %s %s' % (path, os.path.basename(path)) self.debug(cmd) os.system(cmd) os.rmdir('unignored') os.chdir(oldPath) def diffCheckout(self, checkoutDir): """ Diff our checkout to the given checkout directory. Only complains about diffs in files we're interested in, which are tracked or unignored files. """ options = "" if self.meta: metaPattern = [s.replace('.', '\.') for s in self.meta] options = "-x ".join([''] + metaPattern) cmd = 'diff -aur %s %s %s 2>&1' % (options, self.path, checkoutDir) self.debug('diffCheckout: running %s' % cmd) output = commands.getoutput(cmd) lines = output.split('\n') # we can't use diff -x for excluding ignored files, because -x # takes a pattern for basename only, so we need to scrub output d = {} for path in self.getIgnored(self.path): d[path] = True matcher = re.compile('Only in (.*): (.*)$') def isIgnored(line): # filter out lines for ignored files m = matcher.search(line) if m: path = os.path.join(m.expand("\\1"), m.expand("\\2")) if path in d.keys(): self.debug('Removing ignored path %s from diff' % path) return True return False lines = [l for l in lines if isIgnored(l)] return "\n".join(lines) class VCSException(Exception): """ Generic exception for a failed VCS operation. """ pass class VCSBackupException(VCSException): 'The VCS cannot back up the working directory.' moap-0.2.7/moap/vcs/__init__.py0000644000076400007640000000000010540745422013236 00000000000000moap-0.2.7/moap/configure/0000777000076400007640000000000011220504670012403 500000000000000moap-0.2.7/moap/configure/uninstalled.py.in0000644000076400007640000000022610540745421015625 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 def get(): return { 'isinstalled': False, 'version': '@VERSION@', } moap-0.2.7/moap/configure/installed.py.in0000644000076400007640000000024110540745421015257 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import os def get(): return { 'isinstalled': True, 'version': '@VERSION@', } moap-0.2.7/moap/configure/Makefile.in0000664000076400007640000002552511220504524014375 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = moap/configure DIST_COMMON = $(moap_PYTHON) $(noinst_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/installed.py.in \ $(srcdir)/uninstalled.py.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = uninstalled.py installed.py SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(moapdir)" moapPYTHON_INSTALL = $(INSTALL_DATA) py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/configure moap_PYTHON = \ __init__.py \ configure.py \ installed.py noinst_PYTHON = uninstalled.py BUILT_SOURCES = installed.py uninstalled.py TAGS_FILES = installed.py.in uninstalled.py.in DISTCLEANFILES = installed.pyc installed.pyo uninstalled.pyc uninstalled.pyo EXTRA_DIST = $(moap_PYTHON) installed.py.in uninstalled.py.in all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu moap/configure/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu moap/configure/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstalled.py: $(top_builddir)/config.status $(srcdir)/uninstalled.py.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ installed.py: $(top_builddir)/config.status $(srcdir)/installed.py.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-moapPYTHON: $(moap_PYTHON) @$(NORMAL_INSTALL) test -z "$(moapdir)" || $(MKDIR_P) "$(DESTDIR)$(moapdir)" @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(moapPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(moapdir)/$$f'"; \ $(moapPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(moapdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(moapdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(moapdir)" $$dlist; \ fi; \ else :; fi uninstall-moapPYTHON: @$(NORMAL_UNINSTALL) @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(moapdir)/$$f"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}c"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}o"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(moapdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-moapPYTHON install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-moapPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-moapPYTHON install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-moapPYTHON # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/moap/configure/uninstalled.py0000664000076400007640000000022211220504527015212 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 def get(): return { 'isinstalled': False, 'version': '0.2.7', } moap-0.2.7/moap/configure/Makefile.am0000664000076400007640000000061110626006357014363 00000000000000CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/configure moap_PYTHON = \ __init__.py \ configure.py \ installed.py noinst_PYTHON = uninstalled.py BUILT_SOURCES = installed.py uninstalled.py TAGS_FILES = installed.py.in uninstalled.py.in DISTCLEANFILES = installed.pyc installed.pyo uninstalled.pyc uninstalled.pyo EXTRA_DIST = $(moap_PYTHON) installed.py.in uninstalled.py.in moap-0.2.7/moap/configure/installed.py0000664000076400007640000000023511220504527014653 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import os def get(): return { 'isinstalled': True, 'version': '0.2.7', } moap-0.2.7/moap/configure/configure.py0000644000076400007640000000152710540745421014664 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 ''' configure-time variables for installed or uninstalled operation Code should run >>> from moap.configure import configure and then access the variables from the configure module. For example: >>> print configure.version @var isinstalled: whether an installed version is being run @type isinstalled: boolean @var version: moap version number @type version: string ''' import os # where am I on the disk ? __thisdir = os.path.dirname(os.path.abspath(__file__)) if os.path.exists(os.path.join(__thisdir, 'uninstalled.py')): from moap.configure import uninstalled config_dict = uninstalled.get() else: from moap.configure import installed config_dict = installed.get() for key, value in config_dict.items(): dictionary = locals() dictionary[key] = value moap-0.2.7/moap/configure/__init__.py0000644000076400007640000000000010540745421014423 00000000000000moap-0.2.7/moap/command/0000777000076400007640000000000011220504670012040 500000000000000moap-0.2.7/moap/command/doap.py0000664000076400007640000004213311220463121013251 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_commands_doap -*- # vi:si:et:sw=4:sts=4:ts=4 import os import glob import sys import urllib import tarfile from moap.util import util, mail from moap.doap import doap import bug def urlgrab(url, filename): opener = urllib.URLopener() try: (t, h) = opener.retrieve(url, filename) except IOError, e: if len(e.args) == 4: # http error masquerading as IO error if e.args[0] != 'http error': raise e code = e.args[1] if code == 404: print "URL %s not found" % url raise e else: raise e class Freshmeat(util.LogCommand): summary = "submit to Freshmeat" description = """This command submits a release to Freshmeat. Login details are taken from $HOME/.netrc. Add a section for a machine named "freshmeat" with login and password settings. Use --name if you want to override the project's name gotten from the .DOAP file; to be used for example if your project uses dashes in the name which Freshmeat does not allow. """ def addOptions(self): self.parser.add_option('-b', '--branch', action="store", dest="branch", help="branch to submit, overriding the doap branch") self.parser.add_option('-n', '--name', action="store", dest="name", help="name to submit, overriding the project name") def handleOptions(self, options): self.options = options def do(self, args): self.debug('submitting to freshmeat') d = self.parentCommand.doap if not self.parentCommand.version: sys.stderr.write('Please specify a version to submit with -v.\n') return 3 # FIXME: add hide-from-front-page project = d.getProject() from moap.publish import freshmeat fm = freshmeat.Session() try: fm.login() except freshmeat.SessionException, e: sys.stderr.write('Could not login to Freshmeat: %s\n' % e.message) return 3 release = project.getRelease(self.parentCommand.version) if not release: sys.stderr.write('No revision %s found.\n' % self.parentCommand.version) return 3 # FIXME: fm.fetch_release() seems to lie to me when I use it # on gstreamer # branches on Freshmeat are called "Default" by default branch = self.options.branch or release.version.branch or "Default" name = self.options.name or project.shortname # submit # FIXME: how do we get changes and release_focus ? args = { 'project_name': name, 'branch_name': branch, 'version': release.version.revision, 'changes': "Unknown", 'release_focus': 4, 'hide_from_frontpage': 'N', } for uri in release.version.file_release: mapping = { '.tar.gz': 'tgz', '.tgz': 'tgz', '.tar.bz2': 'bz2', '.rpm': 'rpm', } for ext in mapping.keys(): if uri.endswith(ext): key = 'url_%s' % mapping[ext] self.stdout.write("- %s: %s\n" % (key, uri)) args[key] = uri self.stdout.write( "Submitting release of %s %s on branch %s\n" % ( project.name, self.parentCommand.version, branch)) try: fm.publish_release(**args) except freshmeat.SessionError, e: if e.code == 40: self.stderr.write("ERROR: denied releasing %r\n" % self.parentCommand.version) if e.code == 30: self.stderr.write( """ERROR: Freshmeat does not know the branch '%s'. Most projects on Freshmeat have a branch named Default. You can override the branch name manually with -b/--branch. """ % branch) elif e.code == 51: self.stderr.write( "Freshmeat already knows about this version\n") elif e.code == 81: self.stderr.write("Freshmeat does not know the project %s\n" % project.shortname) else: self.stderr.write("ERROR: %r\n" % e) class Search(util.LogCommand): description = "look up rank of project's home page based on keywords" _engines = ["google", "yahoo"] _default = "yahoo" def addOptions(self): self.parser.add_option('-e', '--engine', action="store", dest="engine", default=self._default, help="search engine to use (out of %s; defaults to %s)" % ( ", ".join(self._engines), self._default)) self.parser.add_option('-l', '--limit', action="store", dest="limit", default="100", help="maximum number of results to look at") def handleOptions(self, options): self._limit = int(options.limit) self._engine = options.engine def do(self, args): if not args: self.stderr.write('Please provide a search query.\n') return 3 d = self.parentCommand.doap project = d.getProject() rank = 0 found = False query = " ".join(args) def foundURL(target, url): # returns true if the url is close enough to the target if target.endswith('/'): target = target[:-1] if url.endswith('/'): url = url[:-1] return url == target if self._engine == 'google': from pygoogle import google while not found: self.debug('Doing Google search for %s starting from %d' % ( " ".join(args), rank)) value = google.doGoogleSearch(" ".join(args), start=rank) for result in value.results: rank += 1 self.debug('Hit %d: URL %s' % (rank, result.URL)) if foundURL(project.homepage, result.URL): found = True break if rank >= self._limit: break elif self._engine == 'yahoo': from yahoo.search import web # yahoo's start is 1-based while not found: search = web.WebSearch('moapmoap', query=query, start=rank+1) info = search.parse_results() for result in info.results: rank += 1 self.debug('Hit %d: URL %s' % (rank, result['Url'])) if foundURL(project.homepage, result['Url']): found = True break if rank >= self._limit: break else: self.stderr.write("Unknown search engine '%s'.\n" % self._engine) self.stderr.write("Please choose from %s.\n" % ", ".join(self._engines)) return 3 if found: self.stdout.write("Found homepage as hit %d\n." % rank) else: self.stdout.write("Did not find homepage in first %d hits.\n" % self._limit) class Ical(util.LogCommand): description = "Output iCal stream from project releases" def do(self, args): __pychecker__ = 'no-argsused' self.stdout.write("""BEGIN:VCALENDAR PRODID:-//thomas.apestaart.org//moap//EN VERSION:2.0 """) entries = [] # created, dict i = 0 for d in self.parentCommand.doaps: i += 1 # count projects to resolve created clashes project = d.getProject() for r in project.release: d = { 'projectName': project.name, 'projectId': project.shortname, 'revision': r.version.revision, 'name': r.version.name, 'created': r.version.created, # DATE should be without dashes 'date': "".join(r.version.created.split('-')), } entries.append((r.version.created, i, d)) # sort entries on created, then doap file order entries.sort() for c, i, d in entries: # evolution needs UID set for webcal:// calendars self.stdout.write("""BEGIN:VEVENT SUMMARY:%(projectName)s %(revision)s '%(name)s' released UID:%(created)s-%(projectId)s-%(revision)s@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:%(date)s DTEND;VALUE=DATE:%(date)s END:VEVENT """ % d) self.stdout.write("\nEND:VCALENDAR\n") class Mail(util.LogCommand): summary = "send release announcement through mail" usage = "[mail-options] [TO]..." description = """Send out release announcement mail. The To: addresses can be specified as arguments to the mail command.""" def addOptions(self): self.parser.add_option('-f', '--from', action="store", dest="fromm", help="address to send from") self.parser.add_option('-n', '--dry-run', action="store_true", dest="dry_run", help="show the mail that would have been sent") self.parser.add_option('-R', '--release-notes', action="store", dest="release_notes", help="release notes to use (otherwise looked up in tarball)") def handleOptions(self, options): self.options = options def do(self, args): d = self.parentCommand.doap if not self.parentCommand.version: sys.stderr.write('Please specify a version to submit with -v.\n') return 3 version = self.parentCommand.version if not self.options.fromm: sys.stderr.write('Please specify a From: address with -f.\n') return 3 if len(args) < 1: sys.stderr.write('Please specify one or more To: addresses.\n') return 3 to = args project = d.getProject() release = project.getRelease(version) if not release: sys.stderr.write('No revision %s found.\n' % version) return 3 # get a list of release files keep = [] extensions = ['.tar.gz', '.tgz', '.tar.bz2'] for uri in release.version.file_release: for ext in extensions: if uri.endswith(ext): keep.append(uri) self.debug('Release files: %r' % keep) # now that we have a list of candidates, check if any of them # exists in the current directory found = False for uri in keep: filename = os.path.basename(uri) if os.path.exists(filename): sys.stdout.write("Found release %s in current directory.\n" % filename) found = True break # if we don't have a local archive, try and get a uri one if not found: for uri in keep: if uri.startswith('http') or uri.startswith('ftp:'): filename = os.path.basename(uri) sys.stdout.write('Downloading %s ... ' % uri) sys.stdout.flush() urlgrab(uri, filename) sys.stdout.write('done.\n') sys.stdout.write( "Downloaded %s in current dir\n" % filename) found = True break if not found: self.stderr.write("ERROR: no file found\n") return 1 # filename now is the path to a tar/bz2 self.debug('Found %s' % filename) # Find the release notes RELEASE = None if self.options.release_notes: RELEASE = open(self.options.release_notes).read() else: tar_archive = tarfile.open(mode="r", name=filename) for tarinfo in tar_archive: if tarinfo.name.endswith('RELEASE'): RELEASE = tar_archive.extractfile(tarinfo).read() tar_archive.close() # now send out the mail with the release notes attached d = { 'projectName': project.name, 'version': version, 'releaseName': release.version.name } subject = "RELEASE: %(projectName)s %(version)s '%(releaseName)s'" % d content = "This mail announces the release of " content += "%(projectName)s %(version)s '%(releaseName)s'.\n\n" % d content += "%s\n" % project.description if project.homepage: content += "For more information, see %s\n" % project.homepage if project.bug_database: content += "To file bugs, go to %s\n" % project.bug_database message = mail.Message(subject, to, self.options.fromm) message.setContent(content) if RELEASE: message.addAttachment('RELEASE', 'text/plain', RELEASE) if self.options.dry_run: self.stdout.write(message.get()) else: self.stdout.write('Sending release announcement ... ') message.send() self.stdout.write('sent.\n') return 0 class Rss(util.LogCommand): description = "Output RSS 2 feed from project releases" def addOptions(self): self.parser.add_option('-t', '--template-language', action="store", dest="language", help="template language to use (genshi/cheetah)") def handleOptions(self, options): self._language = options.language or 'genshi' def do(self, args): from moap.doap import rss template = None # if one is specified, prefer it if args: # FIXME: maybe find a default one based on the doap name ? # like .doap -> .rss2.tmpl ? path = args[0] try: handle = open(path) template = handle.read() handle.close() except: self.stderr.write("Could not read template %s.\n" % path) return 3 self.debug("Using requested template %s" % template) # FIXME: if one can be found close to the .doap file, use it text = rss.doapsToRss(self.parentCommand.doaps, template, templateType=self._language) self.stdout.write(text) class Show(util.LogCommand): description = "Show project information" def do(self, args): __pychecker__ = 'no-argsused' d = self.parentCommand.doap project = d.getProject() self.stdout.write("DOAP file: %s\n" % d.path) self.stdout.write("project: %s\n" % project.name) if project.shortdesc: self.stdout.write("short description: %s\n" % project.shortdesc) if project.created: self.stdout.write("created: %s\n" % project.created) if project.homepage: self.stdout.write("homepage: %s\n" % project.homepage) if project.bug_database: self.stdout.write("bug database: %s\n" % project.bug_database) if project.download_page: self.stdout.write("download page: %s\n" % project.download_page) if project.wiki: self.stdout.write("wiki: %s\n" % project.wiki) if not project.release: self.stdout.write(" No releases made.\n") else: v = project.release[0].version self.stdout.write( "Latest release: version %s '%s' on branch %s.\n" % ( v.revision, v.name, v.branch)) class Doap(util.LogCommand): """ @ivar doap: the L{doap.Doap} object. """ usage = "[doap-options] %command" description = "read and act on DOAP file" subCommandClasses = [Freshmeat, Ical, Mail, Rss, Search, Show, bug.Bug] doap = None def addOptions(self): self.parser.add_option('-f', '--file', action="append", dest="files", help=".doap file(s) to act on (glob wildcards allowed)") self.parser.add_option('-v', '--version', action="store", dest="version", help="version to submit") def handleOptions(self, options): self.paths = [] self.doaps = [] if options.files: for f in options.files: self.paths.extend(glob.glob(f)) self.debug('%d doap paths' % len(self.paths)) self.version = options.version if not self.paths: # nothing specified, try and find the default try: self.doap = doap.findDoapFile(None) self.doaps = [self.doap, ] except doap.DoapException, e: sys.stdout.write(e.args[0]) return 3 return for p in self.paths: try: d = doap.findDoapFile(p) except doap.DoapException, e: sys.stdout.write(e.args[0]) return 3 self.doaps.append(d) # FIXME: compat, remove in users self.doap = self.doaps[0] moap-0.2.7/moap/command/Makefile.in0000664000076400007640000002403211220504524014022 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = moap/command DIST_COMMON = $(moap_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(moapdir)" moapPYTHON_INSTALL = $(INSTALL_DATA) py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/command moap_PYTHON = \ __init__.py \ cl.py \ code.py \ doap.py \ bug.py \ ignore.py \ tracadmin.py \ vcs.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu moap/command/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu moap/command/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-moapPYTHON: $(moap_PYTHON) @$(NORMAL_INSTALL) test -z "$(moapdir)" || $(MKDIR_P) "$(DESTDIR)$(moapdir)" @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(moapPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(moapdir)/$$f'"; \ $(moapPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(moapdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(moapdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(moapdir)" $$dlist; \ fi; \ else :; fi uninstall-moapPYTHON: @$(NORMAL_UNINSTALL) @list='$(moap_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(moapdir)/$$f"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}c"; \ rm -f "$(DESTDIR)$(moapdir)/$${f}o"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(moapdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-moapPYTHON install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-moapPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-moapPYTHON install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-moapPYTHON # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/moap/command/cl.py0000664000076400007640000005612011174554455012750 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_commands_cl -*- # vi:si:et:sw=4:sts=4:ts=4 import commands import os import pwd import time import re import tempfile import textwrap from moap.util import log, util, ctags from moap.vcs import vcs description = "Read and act on ChangeLog" # for matching the first line of an entry _nameRegex = re.compile('^(\d*-\d*-\d*)\s*(.*)$') # for matching the address out of the second part of the first line _addressRegex = re.compile('^([^<]*)<(.*)>$') # for matching contributors _byRegex = re.compile(' by: ([^<]*)\s*.*$') # for matching files changed _fileRegex = re.compile('^\s*\* (.[^:\s\(]*).*') # for matching release lines _releaseRegex = re.compile(r'^=== release (.*) ===$') # for ChangeLog template _defaultReviewer = "" _defaultPatcher = "" _defaultName = "Please set CHANGE_LOG_NAME or REAL_NAME environment variable" _defaultMail = "Please set CHANGE_LOG_EMAIL_ADDRESS or " \ "EMAIL_ADDRESS environment variable" class Entry: """ I represent one entry in a ChangeLog file. @ivar lines: the original text block of the entry. @type lines: str """ lines = None def match(self, needle, caseSensitive=False): """ Match the given needle against the given entry. Subclasses should override this method. @type caseSensitive: bool @param caseSensitive: whether to do case sensitive searching @returns: whether the entry contains the given needle. """ raise NotImplementedError class ChangeEntry(Entry): """ I represent one entry in a ChangeLog file. @ivar text: the text of the message, without name line or preceding/following newlines @type text: str @type date: str @type name: str @type address: str @ivar files: list of files referenced in this ChangeLog entry @type files: list of str @ivar contributors: list of people who've contributed to this entry @type contributors: str @type notEdited: list of str @ivar notEdited: list of fields with default template value @type """ date = None name = None address = None text = None contributors = None notEdited = None def __init__(self): self.files = [] self.contributors = [] self.notEdited = [] def _checkNotEdited(self, line): if line.find(_defaultMail) >= 0: self.notEdited.append("mail") if line.find(_defaultName) >= 0: self.notEdited.append("name") if line.find(_defaultPatcher) >= 0: self.notEdited.append("patched by") if line.find(_defaultReviewer) >= 0: self.notEdited.append("reviewer") def parse(self, lines): """ @type lines: list of str """ # first line is the "name" line m = _nameRegex.search(lines[0].strip()) self.date = m.expand("\\1") self.name = m.expand("\\2") m = _addressRegex.search(self.name) if m: self.name = m.expand("\\1").strip() self.address = m.expand("\\2") # all the other lines can contain files or contributors self._checkNotEdited(lines[0]) for line in lines[1:]: self._checkNotEdited(line) m = _fileRegex.search(line) if m: fileName = m.expand("\\1") if fileName not in self.files: self.files.append(fileName) m = _byRegex.search(line) if m: # only append entries that we actually have a name for name = m.expand("\\1").strip() if name: self.contributors.append(name) # create the text attribute save = [] for line in lines[1:]: line = line.rstrip() if len(line) > 0: save.append(line) self.text = "\n".join(save) + "\n" def match(self, needle, caseSensitive): keys = ['text', 'name', 'date', 'address'] if not caseSensitive: needle = needle.lower() for key in keys: value = getattr(self, key) if not value: continue if caseSensitive: value = value.lower() if value.find(needle) >= 0: return True return False class ReleaseEntry: """ I represent a release separator in a ChangeLog file. """ version = None def parse(self, lines): """ @type lines: list of str """ # first and only line is the "release" line m = _releaseRegex.search(lines[0]) self.version = m.expand("\\1") def match(self, needle, caseSensitive): value = self.version if not caseSensitive: needle = needle.lower() value = value.lower() if value.find(needle) >= 0: return True return False class ChangeLogFile(log.Loggable): """ I represent a standard ChangeLog file. Create me, then call parse() on me to parse the file into entries. """ logCategory = "ChangeLog" def __init__(self, path): self._path = path self._blocks = [] self._entries = [] self._releases = {} # map of release -> index in self._entries self._handle = None def parse(self, allEntries=True): """ Parse the ChangeLog file into entries. @param allEntries: whether to parse all, or stop on the first. @type allEntries: bool """ def parseBlock(block): if not block: raise TypeError( "ChangeLog entry is empty") self._blocks.append(block) if _nameRegex.match(block[0]): entry = ChangeEntry() elif _releaseRegex.match(block[0]): entry = ReleaseEntry() else: raise TypeError( "ChangeLog entry doesn't match any known types:\n%s" % block) # FIXME: shouldn't the base class handle this, then delegate ? entry.lines = block entry.parse(block) self._entries.append(entry) if isinstance(entry, ReleaseEntry): self._releases[entry.version] = len(self._entries) - 1 return entry for b in self.__blocks(): parseBlock(b) if not allEntries and self._entries: return def __blocks(self): if not self._handle: self._handle = open(self._path, "r") block = [] for line in self._handle.readlines(): if _nameRegex.match(line) or _releaseRegex.match(line): # new entry starting, parse old block if block: yield block block = [] block.append(line) # don't forget the last block yield block self._handle = None self.debug('%d entries in %s' % (len(self._entries), self._path)) def getEntry(self, num): """ Get the nth entry from the ChangeLog, starting from 0 for the most recent one. @raises IndexError: If no entry could be found """ return self._entries[num] def getReleaseIndex(self, release): return self._releases[release] def find(self, needles, caseSensitive=False): """ Find and return all entries whose text matches all of the given strings. @type needles: list of str @param needles: the strings to look for @type caseSensitive: bool @param caseSensitive: whether to do case sensitive searching """ res = [] for entry in self._entries: foundAllNeedles = True for needle in needles: match = entry.match(needle, caseSensitive) # all needles need to be found to be valid if not match: foundAllNeedles = False if foundAllNeedles: res.append(entry) return res class Checkin(util.LogCommand): usage = "[path to directory or ChangeLog file]" summary = "check in files listed in the latest ChangeLog entry" description = """Check in the files listed in the latest ChangeLog entry. Besides using the -c argument to 'changelog', you can also specify the path to the ChangeLog file as an argument, so you can alias 'moap changelog checkin' to a shorter command. Supported VCS systems: %s""" % ", ".join(vcs.getNames()) aliases = ["ci", ] def do(self, args): clPath = self.parentCommand.clPath if args: clPath = self.parentCommand.getClPath(args[0]) clName = os.path.basename(clPath) clDir = os.path.dirname(clPath) if not os.path.exists(clPath): self.stderr.write('No %s found in %s.\n' % (clName, clDir)) return 3 v = vcs.detect(clDir) if not v: self.stderr.write('No VCS detected in %s\n' % clDir) return 3 cl = ChangeLogFile(clPath) # get latest entry cl.parse(False) entry = cl.getEntry(0) if isinstance(entry, ChangeEntry) and entry.notEdited: self.stderr.write( 'ChangeLog entry has not been updated properly:') self.stderr.write("\n - ".join(['', ] + entry.notEdited) + "\n") self.stderr.write("Please fix the entry and try again.\n") return 3 self.debug('Commiting files %r' % entry.files) ret = v.commit([clName, ] + entry.files, entry.text) if not ret: return 1 return 0 class Contributors(util.LogCommand): usage = "[path to directory or ChangeLog file]" summary = "get a list of contributors since the previous release" aliases = ["cont", "contrib"] def addOptions(self): self.parser.add_option('-r', '--release', action="store", dest="release", help="release to get contributors to") def do(self, args): if args: self.stderr.write("Deprecation warning:\n") self.stderr.write("Please use the -c argument to 'changelog'" " to pass a ChangeLog file.\n") return 3 clPath = self.parentCommand.clPath cl = ChangeLogFile(clPath) cl.parse() names = [] # find entry to start at i = 0 if self.options.release: try: i = cl.getReleaseIndex(self.options.release) + 1 except KeyError: self.stderr.write('No release %s found in %s !\n' % ( self.options.release, clPath)) return 3 self.debug('Release %s is entry %d' % (self.options.release, i)) # now scan all entries from that point downwards while True: try: entry = cl.getEntry(i) except IndexError: break if isinstance(entry, ReleaseEntry): break if not entry.name in names: self.debug("Adding name %s" % entry.name) names.append(entry.name) for n in entry.contributors: if not n in names: self.debug("Adding name %s" % n) names.append(n) i += 1 names.sort() self.stdout.write("\n".join(names) + "\n") return 0 class Diff(util.LogCommand): summary = "show diff for all files from latest ChangeLog entry" description = """ Show the difference between local and repository copy of all files mentioned in the latest ChangeLog entry. Supported VCS systems: %s""" % ", ".join(vcs.getNames()) def addOptions(self): self.parser.add_option('-E', '--no-entry', action="store_false", dest="entry", default=True, help="don't prefix the diff with the ChangeLog entry") def do(self, args): if args: self.stderr.write("Deprecation warning:\n") self.stderr.write("Please use the -c argument to 'changelog'" " to pass a ChangeLog file.\n") return 3 clPath = self.parentCommand.clPath path = os.path.dirname(clPath) if not os.path.exists(clPath): self.stderr.write('No ChangeLog found in %s.\n' % path) return 3 v = vcs.detect(path) if not v: self.stderr.write('No VCS detected in %s\n' % path) return 3 cl = ChangeLogFile(clPath) cl.parse(False) # get latest entry entry = cl.getEntry(0) if isinstance(entry, ReleaseEntry): self.stderr.write('No ChangeLog change entry found in %s.\n' % path) return 3 # start with the ChangeLog entry unless requested not to if self.options.entry: self.stdout.write("".join(entry.lines)) for fileName in entry.files: self.debug('diffing %s' % fileName) diff = v.diff(fileName) if diff: self.stdout.write(diff) self.stdout.write('\n') class Find(util.LogCommand): summary = "show all ChangeLog entries containing the given string(s)" description = """ Shows all entries from the ChangeLog whose text contains the given string(s). By default, this command matches case-insensitive. """ def addOptions(self): self.parser.add_option('-c', '--case-sensitive', action="store_true", dest="caseSensitive", default=False, help="Match case when looking for matching ChangeLog entries") def do(self, args): if not args: self.stderr.write('Please give one or more strings to find.\n') return 3 needles = args cl = ChangeLogFile(self.parentCommand.clPath) cl.parse() entries = cl.find(needles, self.options.caseSensitive) for entry in entries: self.stdout.write("".join(entry.lines)) return 0 class Prepare(util.LogCommand): summary = "prepare ChangeLog entry from local diff" description = """This command prepares a new ChangeLog entry by analyzing the local changes gotten from the VCS system used. It uses ctags to extract the tags affected by the changes, and adds them to the ChangeLog entries. It decides your name based on your account settings, the REAL_NAME or CHANGE_LOG_NAME environment variables. It decides your e-mail address based on the CHANGE_LOG_EMAIL_ADDRESS or EMAIL_ADDRESS environment variable. Besides using the -c argument to 'changelog', you can also specify the path to the ChangeLog file as an argument, so you can alias 'moap changelog checkin' to a shorter command. Supported VCS systems: %s""" % ", ".join(vcs.getNames()) usage = "[path to directory or ChangeLog file]" aliases = ["pr", "prep", ] def getCTags(self): """ Get a binary that is ctags-like. """ binary = None for candidate in ["ctags", "exuberant-ctags", "ctags-exuberant"]: self.debug('Checking for existence of %s' % candidate) if os.system('which %s > /dev/null 2>&1' % candidate) == 0: self.debug('Checking for exuberance of %s' % candidate) output = commands.getoutput("%s --version" % candidate) if output.startswith("Exuberant"): binary = candidate break if not binary: self.stderr.write('Warning: no exuberant ctags found.\n') from moap.util import deps deps.handleMissingDependency(deps.ctags()) self.stderr.write('\n') return binary def addOptions(self): self.parser.add_option('-c', '--ctags', action="store_true", dest="ctags", default=False, help="Use ctags to extract and add changed tags to ChangeLog entry") def do(self, args): def filePathRelative(vcsPath, filePath): # the paths are absolute because we asked for an absolute path # diff strip them to be relative if filePath.startswith(vcsPath): filePath = filePath[len(vcsPath) + 1:] return filePath def writeLine(about): line = "\t* %s:\n" % about # wrap to maximum 72 characters, and keep tabs lines = textwrap.wrap(line, 72, expand_tabs=False, replace_whitespace=False, subsequent_indent="\t ") os.write(fd, "\n".join(lines) + '\n') clPath = self.parentCommand.clPath if args: clPath = self.parentCommand.getClPath(args[0]) vcsPath = os.path.dirname(os.path.abspath(clPath)) v = vcs.detect(vcsPath) if not v: self.stderr.write('No VCS detected in %s\n' % vcsPath) return 3 self.stdout.write('Updating %s from %s repository.\n' % (clPath, v.name)) try: v.update(clPath) except vcs.VCSException, e: self.stderr.write('Could not update %s:\n%s\n' % ( clPath, e.args[0])) return 3 self.stdout.write('Finding changes.\n') changes = v.getChanges(vcsPath) propertyChanges = v.getPropertyChanges(vcsPath) added = v.getAdded(vcsPath) deleted = v.getDeleted(vcsPath) # filter out the ChangeLog we're preparing if os.path.abspath(clPath) in changes.keys(): del changes[os.path.abspath(clPath)] if not (changes or propertyChanges or added or deleted): self.stdout.write('No changes detected.\n') return 0 if changes: files = changes.keys() files.sort() ct = ctags.CTags() if self.options.ctags: # run ctags only on files that aren't deleted ctagsFiles = files[:] for f in files: if not os.path.exists(f): ctagsFiles.remove(f) # get the tags for all the files we're looking at binary = self.getCTags() if binary: self.stdout.write('Extracting affected tags from source.\n') # -q includes extra class-qualified tag entry for each tag # which is a member of a class; # see https://thomas.apestaart.org/moap/trac/ticket/283 command = "%s -u --fields=+nlS --extra=+q -f - %s" % ( binary, " ".join(ctagsFiles)) self.debug('Running command %s' % command) output = commands.getoutput(command) ct.addString(output) # prepare header for entry date = time.strftime('%Y-%m-%d') for name in [ os.environ.get('CHANGE_LOG_NAME'), os.environ.get('REAL_NAME'), pwd.getpwuid(os.getuid()).pw_gecos, _defaultName]: if name: break for mail in [ os.environ.get('CHANGE_LOG_EMAIL_ADDRESS'), os.environ.get('EMAIL_ADDRESS'), _defaultMail]: if mail: break self.stdout.write('Editing %s.\n' % clPath) (fd, tmpPath) = tempfile.mkstemp(suffix='.moap') os.write(fd, "%s %s <%s>\n\n" % (date, name, mail)) os.write(fd, "\treviewed by: %s\n" % _defaultReviewer); os.write(fd, "\tpatch by: %s\n" % _defaultPatcher); os.write(fd, "\n") if changes: self.debug('Analyzing changes') for filePath in files: if not os.path.exists(filePath): self.debug("%s not found, assuming it got deleted" % filePath) continue lines = changes[filePath] tags = [] for oldLine, oldCount, newLine, newCount in lines: self.log("Looking in file %s, newLine %r, newCount %r" % ( filePath, newLine, newCount)) try: for t in ct.getTags(filePath, newLine, newCount): # we want unique tags, not several hits for one if not t in tags: tags.append(t) except KeyError: pass filePath = filePathRelative(vcsPath, filePath) tagPart = "" if tags: parts = [] for tag in tags: if tag.klazz: parts.append('%s.%s' % (tag.klazz, tag.name)) else: parts.append(tag.name) tagPart = " (" + ", ".join(parts) + ")" writeLine(filePath + tagPart) if propertyChanges: self.debug('Handling property changes') for filePath, properties in propertyChanges.items(): filePath = filePathRelative(vcsPath, filePath) writeLine("%s (%s)" % (filePath, ", ".join(properties))) if added: self.debug('Handling path additions') for path in added: writeLine("%s (added)" % path) if deleted: self.debug('Handling path deletions') for path in deleted: writeLine("%s (deleted)" % path) os.write(fd, "\n") # copy rest of ChangeLog file if os.path.exists(clPath): self.debug('Appending from old %s' % clPath) handle = open(clPath) while True: data = handle.read() if not data: break os.write(fd, data) os.close(fd) # FIXME: figure out a nice pythonic move for cross-device links instead cmd = "mv %s %s" % (tmpPath, clPath) self.debug(cmd) os.system(cmd) return 0 class ChangeLog(util.LogCommand): """ ivar clPath: path to the ChangeLog file, for subcommands to use. type clPath: str """ summary = "act on ChangeLog file" description = """Act on a ChangeLog file. Some of the commands use the version control system in use. Supported VCS systems: %s""" % ", ".join(vcs.getNames()) subCommandClasses = [Checkin, Contributors, Diff, Find, Prepare] aliases = ["cl", ] def addOptions(self): self.parser.add_option('-C', '--ChangeLog', action="store", dest="changelog", default="ChangeLog", help="path to ChangeLog file or directory containing it") def handleOptions(self, options): self.clPath = self.getClPath(options.changelog) def getClPath(self, clPath): """ Helper for subcommands to expand a patch to either a file or a dir, to a path to the ChangeLog file. """ if os.path.isdir(clPath): clPath = os.path.join(clPath, "ChangeLog") self.debug('changelog: path %s' % clPath) return clPath moap-0.2.7/moap/command/Makefile.am0000664000076400007640000000025511035702110014005 00000000000000CLEANFILES = *.py{c,o} moapdir = $(PYTHONLIBDIR)/moap/command moap_PYTHON = \ __init__.py \ cl.py \ code.py \ doap.py \ bug.py \ ignore.py \ tracadmin.py \ vcs.py moap-0.2.7/moap/command/tracadmin.py0000664000076400007640000001652311056076134014307 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import os from moap.util import util, usermap # table name, column, filter query, multiple values possible USER_TABLES = [ ('permission', 'username', None, False), ('auth_cookie', 'name', None, False), # it looks like the lines with authenticated == 0 are hashes, and with == 1 # are usernames ('session', 'sid', 'authenticated=1', False), ('session_attribute', 'sid', 'authenticated=1', False), ('wiki', 'author', None, False), ('attachment', 'author', None, False), ('ticket', 'owner', None, False), ('ticket', 'reporter', None, False), ('ticket_change', 'author', None, False), ('ticket_change', 'oldvalue', "(field='qa_contact' OR field='owner')", True), ('ticket_change', 'newvalue', "(field='qa_contact' OR field='owner' OR field='reporter')", True), ] class List(util.LogCommand): summary = "list users in Trac database" def do(self, args): users = {} cxn = self.parentCommand.parentCommand.cxn c = cxn.cursor() for table, column, where, multiple in USER_TABLES: query = "SELECT %s FROM %s" % (column, table) if where: query += " WHERE %s" % where self.debug('Executing query %s' % query) c.execute(query) for row in c: if not row[0]: continue # fields like qa_contact can have multiple users, separated # with , if multiple: names = row[0].split(',') if len(names) > 1: self.debug('Found multiple names: %s' % row[0]) for name in names: users[name] = True else: # verification if row[0].find(',') > -1: self.warning( "table '%s', column '%s'" " has multiple value '%s'." % ( table, column, row[0])) continue users[row[0]] = True # filter out "special" users for user in ['', 'anonymous', 'authenticated']: try: del users[user] except KeyError: pass userList = users.keys() userList.sort() for user in userList: self.stdout.write("%s\n" % user) class Rename(util.LogCommand): summary = "rename a user in the Trac database" description = """Rename a user in the Trac database. This updates all tables in the trac database where usernames are stored. This operation obviously is non-reversible, so use with care. Only tested with the sqlite backend of Trac, but since it uses the Trac database API it should work with any backend. """ def addOptions(self): self.parser.add_option('-u', '--usermap', action="store", dest="usermap", help="path to a file containing oldname:newname entries") def do(self, args): umap = usermap.UserMap() if self.options.usermap: umap.parseFromPath(self.options.usermap) else: try: old = args[0] except IndexError: self.stderr.write( 'Please specify the old username to change.\n') return 3 try: new = args[1] except IndexError: self.stderr.write( 'Please specify the new username to change to.\n') return 3 umap = usermap.UserMap() umap.parse("%s:%s" % (old, new)) for old, new in umap: self.renameUser(old, new) def renameUser(self, old, new): self.debug('Renaming %s to %s' % (old, new)) cxn = self.parentCommand.parentCommand.cxn for table, column, where, multiple in USER_TABLES: c = cxn.cursor() # first do all renames for non-multiple fields query = "UPDATE %(table)s SET %(column)s='%(new)s'" \ " WHERE %(column)s='%(old)s'" % locals() if where: query += " AND %s" % where self.debug('Executing query %s' % query) c.execute(query) # now take tables into account that have multiple fields if multiple: c = cxn.cursor() query = "SELECT %(column)s FROM %(table)s" \ " WHERE %(column)s LIKE '%%,%%' " % locals() if where: query += " AND %s" % where self.debug('Executing query %s' % query) c.execute(query) multiples = {} for row in c: if not row[0]: continue names = row[0].split(',') if not old in names: continue multiples[row[0]] = True for oldValue in multiples.keys(): # now that we know what to look for, we can update self.stdout.write("Table '%s', column '%s' has value '%s'. " "Please fix this manually.\n" % ( table, column, oldValue)) names = oldValue.split(',') newNames = [] for name in names: if name == old: newNames.append(new) else: newNames.append(name) newValue = ",".join(newNames) query = "UPDATE %(table)s SET %(column)s='%(newValue)s'" \ " WHERE %(column)s='%(oldValue)s'" % locals() if where: query += " AND %s" % where self.debug('Executing query %s' % query) c.execute(query) # now commit all the changes cxn.commit() class User(util.LogCommand): description = "Manage users." subCommandClasses = [List, Rename] class TracAdmin(util.LogCommand): """ @ivar path: path to the Trac project environment @ivar cxn: connection to Trac database @ivar environment: Trac environment @type environment: L{trac.env.Environment} """ summary = "interact with a server-side trac installation" description = """Interact with a server-side trac installation. This can be useful for maintainers of Trac installations. """ subCommandClasses = [User] def addOptions(self): self.parser.add_option('-p', '--project', action="store", dest="project", help="path to Trac project") def handleOptions(self, options): self.path = options.project if not self.path: self.path = os.getcwd() # verify it is a trac project dbPath = os.path.join(self.path, 'db', 'trac.db') if not os.path.exists(dbPath): self.stderr.write("%s is not a Trac project.\n" % self.path) return 3 from trac import env self.environment = env.Environment(self.path) self.cxn = self.environment.get_db_cnx() moap-0.2.7/moap/command/ignore.py0000664000076400007640000000275211154032735013625 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import os import sys from moap.util import util from moap.vcs import vcs class Ignore(util.LogCommand): usage = "[ignore-options] [path to source]" summary = "update VCS ignore list" description = """Updates the list of files the VCS should ignore. Supported VCS systems: %s""" % ", ".join(vcs.getNames()) def addOptions(self): self.parser.add_option('-l', '--list', action="store_true", dest="list", help="only list unignored files") self.parser.add_option('-n', '--no-commit', action="store_true", dest="noCommit", help="do not commit to repository") def handleOptions(self, options): self.options = options def do(self, args): path = os.getcwd() if args: path = args[0] v = vcs.detect(path) if not v: sys.stderr.write('No VCS detected in %s\n' % path) return 3 paths = v.getUnknown(path) if not paths: print "No unignored files." return 0 if self.options.list: print "Unignored files:\n" for p in paths: print p return 0 result = util.editTemp(paths, [ 'Remove all the files that should not be ignored.', 'Glob-style lines are allowed.' ]) v.ignore(result, not self.options.noCommit) moap-0.2.7/moap/command/vcs.py0000664000076400007640000000212511056076136013133 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import os import sys from moap.vcs import vcs from moap.util import util, mail class Backup(util.LogCommand): summary = "back up working copy" description = """Backs up the working copy to the given archive. The archive can be used with the restore command to restore the working copy to its original state, modulo all ignored files. The archive includes checkout commands, a local diff, and all untracked files. """ def do(self, args): if not args: sys.stderr.write('Please specify a path for the archive.\n') return 3 archive = args[0] path = os.getcwd() if len(args) > 1: path = args[1] v = vcs.detect(path) if not v: sys.stderr.write('No VCS detected in %s\n' % path) return 3 v.backup(archive) self.stdout.write("Archived working copy '%s' to '%s'.\n" % ( path, archive)) class VCS(util.LogCommand): description = "do version control system-specific things" subCommandClasses = [Backup] moap-0.2.7/moap/command/bug.py0000664000076400007640000000756011154032731013115 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import sys from moap.util import util, mail from moap.bug import bug from moap.doap import doap class Show(util.LogCommand): usage = "[bug id]" summary = "show a bug" def do(self, args): if not args: sys.stderr.write('Please give a bug id to show.\n') return 3 bugId = args[0] self.debug('Looking up bug %r' % bugId) tracker = self.parentCommand.tracker try: b = tracker.getBug(bugId) except bug.NotFoundError, e: sys.stderr.write('Bug %s not found in bug tracker.\n' % e.id) return 3 print "%s: %s" % (b.id, b.summary) class Query(util.LogCommand): summary = "query for bugs" description = """Query the bug database for bugs. You can specify an output format string with --format. Allowed variables are: id, summary Example for trac (using moap's .doap file): $ moap doap bug query -f "%(id)s" owner=thomas Example for bugzilla: $ moap bug -U http://bugzilla.gnome.org/ query "product=GStreamer&component=gst-plugins-base&target_milestone=0.10.2" """ def addOptions(self): self.parser.add_option('-q', '--query', action="store", dest="query", help="query string") self.parser.add_option('-f', '--format', action="store", dest="format", help="format string", default="%(id)s: %(summary)s") def handleOptions(self, options): self.options = options def do(self, args): if not args: sys.stderr.write('Please give a bug search query.\n') return 3 query = args[0] self.debug('Looking up bugs') tracker = self.parentCommand.tracker self.debug('Looking up bug using query %r' % query) bugs = tracker.query(query) if not bugs: sys.stderr.write('Zaroo bugs found.\n') return 3 # scrub the bug dict for b in bugs: d = {} for key in ['id', 'summary']: if hasattr(b, key): d[key] = getattr(b, key) print self.options.format % d class Bug(util.LogCommand): usage = "[bug-options] %command" summary = "interact with bug tracker" description = """ This command will interact with the bug tracker at the URL passed with -U/--URL, or looked up from a .doap file in the current directory. Currently supported bug trackers: trac, bugzilla """ subCommandClasses = [Show, Query] def addOptions(self): self.parser.add_option('-U', '--URL', action="store", dest="URL", help="URL of bug tracker") def handleOptions(self, options): # prefer the URL passed # if not passed, try a doap file self.URL = options.URL if not self.URL: from moap.doap import doap from moap.command import doap as cdoap d = None if isinstance(self.parentCommand, cdoap.Doap): self.debug('Doap is my parent, looking up its doap file') d = self.parentCommand.doap else: self.debug('Looking for a .doap file in the current dir') try: d = doap.findDoapFile(None) except doap.DoapException, e: sys.stderr.write(e.args[0]) if not d: return 3 project = d.getProject() self.URL = project.bug_database else: self.debug('Using specified bug tracker URL %s' % self.URL) self.debug('Looking up bug tracker at %s' % self.URL) tracker = bug.detect(self.URL) if not tracker: sys.stderr.write('No known bug tracker found at %s\n' % self.URL) return 3 self.debug('Found bug tracker %r' % tracker) self.tracker = tracker moap-0.2.7/moap/command/code.py0000664000076400007640000000143310621060535013244 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import sys from moap.util import util, mail class Develop(util.LogCommand): summary = "develop code" description = """This command develops the code for you.""" def handleOptions(self, options): self.options = options def do(self, args): __pychecker__ = 'no-argsused' sys.stderr.write( 'You are missing the hal-readmind package.\n' 'Please install and retry.\n') return 3 class Test(util.LogCommand): summary = "test code you've written" def do(self, args): __pychecker__ = 'no-argsused' print "Yes, you should." return 0 class Code(util.LogCommand): description = "do things to the code" subCommandClasses = [Develop, Test] moap-0.2.7/moap/command/__init__.py0000644000076400007640000000000011056076117014062 00000000000000moap-0.2.7/moap/main.py0000664000076400007640000000241211035702110011626 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import sys from moap.command import doap, cl, ignore, bug, code, tracadmin, vcs from moap.util import log, util, deps def main(argv): c = Moap() try: ret = c.parse(argv) except SystemError, e: sys.stderr.write('moap: error: %s\n' % e.args) return 255 except ImportError, e: deps.handleImportError(e) ret = -1 if ret is None: return 0 return ret class Moap(util.LogCommand): usage = "%prog %command" description = """Moap helps you maintain projects. Moap gives you a tree of subcommands to work with. You can get help on subcommands by using the -h option to the subcommand. """ subCommandClasses = [doap.Doap, cl.ChangeLog, ignore.Ignore, bug.Bug, code.Code, tracadmin.TracAdmin, vcs.VCS] def addOptions(self): # FIXME: is this the right place ? log.init() self.parser.add_option('-v', '--version', action="store_true", dest="version", help="show version information") def handleOptions(self, options): if options.version: from moap.configure import configure print "moap %s" % configure.version sys.exit(0) moap-0.2.7/moap/__init__.py0000644000076400007640000000000010540745422012443 00000000000000moap-0.2.7/moap/test/0000777000076400007640000000000011220504670011401 500000000000000moap-0.2.7/moap/test/test_vcs_cvs.py0000664000076400007640000000521011220415145014372 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_vcs_cvs -*- # vi:si:et:sw=4:sts=4:ts=4 import os import commands import tempfile from moap.vcs import cvs from moap.test import common class CVSTestCase(common.TestCase): if os.system('cvs --version > /dev/null 2>&1') != 0: skip = "No 'cvs' binary, skipping test." def setUp(self): self.repository = tempfile.mkdtemp(prefix="moap.test.") os.system('cvs -d %s init' % self.repository) self.checkout = tempfile.mkdtemp(prefix="moap.test.") cmd = 'cvs -d %s co -d %s .' % (self.repository, self.checkout) (status, output) = commands.getstatusoutput(cmd) self.failIf(status, output) def tearDown(self): os.system('rm -rf %s' % self.checkout) os.system('rm -rf %s' % self.repository) class TestDetect(CVSTestCase): def testDetectRepository(self): # should fail self.failIf(cvs.detect(self.repository)) def testDetectCheckout(self): # should succeed self.failUnless(cvs.detect(self.checkout)) def testHalfCheckout(self): # should fail checkout = tempfile.mkdtemp(prefix="moap.test.") os.mkdir(os.path.join(checkout, '.cvs')) self.failIf(cvs.detect(checkout)) os.system('rm -rf %s' % checkout) class TestTree(CVSTestCase): def testCVS(self): v = cvs.VCSClass(self.checkout) self.failUnless(v) paths = ['test/test1.py', 'test/test2.py', 'test/test3/test4.py', 'test5.py', 'test6/', 'test/test7/'] tree = v.createTree(paths) keys = tree.keys() keys.sort() self.assertEquals(keys, ['', 'test', 'test/test3']) self.failUnless('test1.py' in tree['test']) self.failUnless('test2.py' in tree['test']) self.failUnless('test7' in tree['test']) self.failUnless('test4.py' in tree['test/test3']) self.failUnless('test5.py' in tree[''], tree['']) self.failUnless('test6' in tree[''], tree['']) class TestIgnore(CVSTestCase): def testGetUnignored(self): v = cvs.VCSClass(self.checkout) self.failUnless(v) self.assertEquals(v.getUnknown(v.path), []) path = os.path.join(self.checkout, 'test') handle = open(path, 'w') handle.write('test') handle.close() self.assertEquals(v.getUnknown(v.path), ['test']) v.ignore([path, ]) self.assertEquals(v.getUnknown(v.path), []) class TestDiff(CVSTestCase): def testDiff(self): v = cvs.VCSClass(self.checkout) self.failUnless(v) self.assertEquals(v.diff(self.checkout), "") moap-0.2.7/moap/test/trac/0000777000076400007640000000000011220504670012332 500000000000000moap-0.2.7/moap/test/trac/trac/0000777000076400007640000000000011220504670013263 500000000000000moap-0.2.7/moap/test/trac/trac/log/0000777000076400007640000000000010667100212014042 500000000000000moap-0.2.7/moap/test/trac/trac/log/.svn/0000777000076400007640000000000011220444345014732 500000000000000moap-0.2.7/moap/test/trac/trac/log/.svn/prop-base/0000777000076400007640000000000010667100212016616 500000000000000moap-0.2.7/moap/test/trac/trac/log/.svn/text-base/0000777000076400007640000000000010667100212016622 500000000000000moap-0.2.7/moap/test/trac/trac/log/.svn/entries0000444000076400007640000000026011220253430016227 0000000000000010 dir 398 svn+ssh://thomas.apestaart.org/home/svn/moap/trunk/moap/test/trac/trac/log svn+ssh://thomas.apestaart.org/home/svn/moap 2007-09-03T21:47:28.131562Z 327 thomas moap-0.2.7/moap/test/trac/trac/log/.svn/props/0000777000076400007640000000000010667100212016071 500000000000000moap-0.2.7/moap/test/trac/trac/log/.svn/tmp/0000777000076400007640000000000011220253430015523 500000000000000moap-0.2.7/moap/test/trac/trac/log/.svn/tmp/prop-base/0000777000076400007640000000000010667100212017416 500000000000000moap-0.2.7/moap/test/trac/trac/log/.svn/tmp/text-base/0000777000076400007640000000000010667100212017422 500000000000000moap-0.2.7/moap/test/trac/trac/log/.svn/tmp/props/0000777000076400007640000000000010667100212016671 500000000000000moap-0.2.7/moap/test/trac/trac/VERSION0000664000076400007640000000003310667073661014264 00000000000000Trac Environment Version 1 moap-0.2.7/moap/test/trac/trac/conf/0000777000076400007640000000000010667100212014206 500000000000000moap-0.2.7/moap/test/trac/trac/conf/.svn/0000777000076400007640000000000011220444345015076 500000000000000moap-0.2.7/moap/test/trac/trac/conf/.svn/prop-base/0000777000076400007640000000000010667100212016762 500000000000000moap-0.2.7/moap/test/trac/trac/conf/.svn/text-base/0000777000076400007640000000000010667100361016773 500000000000000moap-0.2.7/moap/test/trac/trac/conf/.svn/text-base/trac.ini.svn-base0000444000076400007640000000431010667073661022066 00000000000000# -*- coding: utf-8 -*- [attachment] max_size = 262144 render_unsafe_content = false [browser] downloadable_paths = /trunk, /branches/*, /tags/* hide_properties = svk:merge render_unsafe_content = false [changeset] max_diff_bytes = 10000000 max_diff_files = 0 wiki_format_messages = true [header_logo] alt = height = -1 link = http://example.org/ src = common/trac_banner.png width = -1 [logging] log_file = trac.log # log_format = log_level = DEBUG log_type = none [mimeviewer] enscript_modes = text/x-dylan:dylan:4 enscript_path = enscript max_preview_size = 262144 mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb php_path = php silvercity_modes = tab_width = 8 [notification] always_notify_owner = false always_notify_reporter = false always_notify_updater = true mime_encoding = base64 smtp_always_bcc = smtp_always_cc = smtp_default_domain = smtp_enabled = false smtp_from = trac@localhost smtp_password = smtp_port = 25 smtp_replyto = trac@localhost smtp_server = localhost smtp_subject_prefix = __default__ smtp_user = use_public_cc = false use_short_addr = false use_tls = false [project] descr = My example project footer = Visit the Trac open source project at
http://trac.edgewall.org/ icon = common/trac.ico name = My Project url = http://example.org/ [search] min_query_length = 3 [ticket] default_component = default_milestone = default_priority = major default_type = defect default_version = restrict_owner = false [timeline] changeset_long_messages = false changeset_show_files = 0 default_daysback = 30 ticket_show_details = false [trac] authz_file = authz_module_name = base_url = check_auth_ip = true database = sqlite:db/trac.db default_charset = iso-8859-15 default_handler = WikiModule htdocs_location = ignore_auth_case = false mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search metanav = login,logout,settings,help,about permission_store = DefaultPermissionStore repository_dir = repository_type = svn # request_filters = # templates_dir = timeout = 20 [wiki] ignore_missing_pages = false render_unsafe_content = false split_page_names = false moap-0.2.7/moap/test/trac/trac/conf/.svn/text-base/trac.ini.sample.svn-base0000444000076400007640000000420210667073661023346 00000000000000[wiki] ignore_missing_pages = false split_page_names = false render_unsafe_content = false [changeset] max_diff_bytes = 10000000 wiki_format_messages = true max_diff_files = 0 [search] min_query_length = 3 [logging] log_format = None log_file = trac.log log_level = DEBUG log_type = none [trac] default_charset = iso-8859-15 ignore_auth_case = false permission_store = DefaultPermissionStore htdocs_location = check_auth_ip = true database = sqlite:db/trac.db authz_module_name = templates_dir = /usr/share/trac/templates default_handler = WikiModule base_url = metanav = login,logout,settings,help,about timeout = 20 request_filters = None mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search repository_type = svn repository_dir = authz_file = [notification] smtp_server = localhost always_notify_updater = true smtp_port = 25 smtp_password = smtp_enabled = false smtp_replyto = trac@localhost smtp_always_cc = always_notify_owner = false smtp_from = trac@localhost always_notify_reporter = false use_tls = false smtp_always_bcc = mime_encoding = base64 smtp_subject_prefix = __default__ use_public_cc = false smtp_user = use_short_addr = false smtp_default_domain = [header_logo] src = common/trac_banner.png alt = height = -1 link = http://example.org/ width = -1 [mimeviewer] enscript_modes = text/x-dylan:dylan:4 max_preview_size = 262144 php_path = php enscript_path = enscript silvercity_modes = mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb tab_width = 8 [attachment] render_unsafe_content = false max_size = 262144 [timeline] changeset_show_files = 0 ticket_show_details = false default_daysback = 30 changeset_long_messages = false [ticket] default_version = default_component = default_type = defect restrict_owner = false default_milestone = default_priority = major [project] url = http://example.org/ icon = common/trac.ico name = My Project descr = My example project footer = Visit the Trac open source project at
http://trac.edgewall.org/ [browser] render_unsafe_content = false hide_properties = svk:merge downloadable_paths = /trunk, /branches/*, /tags/* moap-0.2.7/moap/test/trac/trac/conf/.svn/entries0000444000076400007640000000065011220253430016376 0000000000000010 dir 398 svn+ssh://thomas.apestaart.org/home/svn/moap/trunk/moap/test/trac/trac/conf svn+ssh://thomas.apestaart.org/home/svn/moap 2007-09-03T21:47:28.131562Z 327 thomas trac.ini.sample file 2007-09-03T21:08:01.000000Z a9465992db7ef1a65c9d88f9a98c5c5b 2007-09-03T21:47:28.131562Z 327 thomas trac.ini file 2007-09-03T21:08:01.000000Z dc0549cf9e671f8026bda3bdc8adc66e 2007-09-03T21:47:28.131562Z 327 thomas moap-0.2.7/moap/test/trac/trac/conf/.svn/props/0000777000076400007640000000000010667100212016235 500000000000000moap-0.2.7/moap/test/trac/trac/conf/.svn/tmp/0000777000076400007640000000000011220253430015667 500000000000000moap-0.2.7/moap/test/trac/trac/conf/.svn/tmp/prop-base/0000777000076400007640000000000010667100212017562 500000000000000moap-0.2.7/moap/test/trac/trac/conf/.svn/tmp/text-base/0000777000076400007640000000000010667100361017573 500000000000000moap-0.2.7/moap/test/trac/trac/conf/.svn/tmp/props/0000777000076400007640000000000010667100212017035 500000000000000moap-0.2.7/moap/test/trac/trac/conf/trac.ini.sample0000664000076400007640000000420210667073661017055 00000000000000[wiki] ignore_missing_pages = false split_page_names = false render_unsafe_content = false [changeset] max_diff_bytes = 10000000 wiki_format_messages = true max_diff_files = 0 [search] min_query_length = 3 [logging] log_format = None log_file = trac.log log_level = DEBUG log_type = none [trac] default_charset = iso-8859-15 ignore_auth_case = false permission_store = DefaultPermissionStore htdocs_location = check_auth_ip = true database = sqlite:db/trac.db authz_module_name = templates_dir = /usr/share/trac/templates default_handler = WikiModule base_url = metanav = login,logout,settings,help,about timeout = 20 request_filters = None mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search repository_type = svn repository_dir = authz_file = [notification] smtp_server = localhost always_notify_updater = true smtp_port = 25 smtp_password = smtp_enabled = false smtp_replyto = trac@localhost smtp_always_cc = always_notify_owner = false smtp_from = trac@localhost always_notify_reporter = false use_tls = false smtp_always_bcc = mime_encoding = base64 smtp_subject_prefix = __default__ use_public_cc = false smtp_user = use_short_addr = false smtp_default_domain = [header_logo] src = common/trac_banner.png alt = height = -1 link = http://example.org/ width = -1 [mimeviewer] enscript_modes = text/x-dylan:dylan:4 max_preview_size = 262144 php_path = php enscript_path = enscript silvercity_modes = mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb tab_width = 8 [attachment] render_unsafe_content = false max_size = 262144 [timeline] changeset_show_files = 0 ticket_show_details = false default_daysback = 30 changeset_long_messages = false [ticket] default_version = default_component = default_type = defect restrict_owner = false default_milestone = default_priority = major [project] url = http://example.org/ icon = common/trac.ico name = My Project descr = My example project footer = Visit the Trac open source project at
http://trac.edgewall.org/ [browser] render_unsafe_content = false hide_properties = svk:merge downloadable_paths = /trunk, /branches/*, /tags/* moap-0.2.7/moap/test/trac/trac/conf/trac.ini0000664000076400007640000000431010667073661015575 00000000000000# -*- coding: utf-8 -*- [attachment] max_size = 262144 render_unsafe_content = false [browser] downloadable_paths = /trunk, /branches/*, /tags/* hide_properties = svk:merge render_unsafe_content = false [changeset] max_diff_bytes = 10000000 max_diff_files = 0 wiki_format_messages = true [header_logo] alt = height = -1 link = http://example.org/ src = common/trac_banner.png width = -1 [logging] log_file = trac.log # log_format = log_level = DEBUG log_type = none [mimeviewer] enscript_modes = text/x-dylan:dylan:4 enscript_path = enscript max_preview_size = 262144 mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb php_path = php silvercity_modes = tab_width = 8 [notification] always_notify_owner = false always_notify_reporter = false always_notify_updater = true mime_encoding = base64 smtp_always_bcc = smtp_always_cc = smtp_default_domain = smtp_enabled = false smtp_from = trac@localhost smtp_password = smtp_port = 25 smtp_replyto = trac@localhost smtp_server = localhost smtp_subject_prefix = __default__ smtp_user = use_public_cc = false use_short_addr = false use_tls = false [project] descr = My example project footer = Visit the Trac open source project at
http://trac.edgewall.org/ icon = common/trac.ico name = My Project url = http://example.org/ [search] min_query_length = 3 [ticket] default_component = default_milestone = default_priority = major default_type = defect default_version = restrict_owner = false [timeline] changeset_long_messages = false changeset_show_files = 0 default_daysback = 30 ticket_show_details = false [trac] authz_file = authz_module_name = base_url = check_auth_ip = true database = sqlite:db/trac.db default_charset = iso-8859-15 default_handler = WikiModule htdocs_location = ignore_auth_case = false mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search metanav = login,logout,settings,help,about permission_store = DefaultPermissionStore repository_dir = repository_type = svn # request_filters = # templates_dir = timeout = 20 [wiki] ignore_missing_pages = false render_unsafe_content = false split_page_names = false moap-0.2.7/moap/test/trac/trac/htdocs/0000777000076400007640000000000010667100212014545 500000000000000moap-0.2.7/moap/test/trac/trac/htdocs/.svn/0000777000076400007640000000000011220444345015435 500000000000000moap-0.2.7/moap/test/trac/trac/htdocs/.svn/prop-base/0000777000076400007640000000000010667100212017321 500000000000000moap-0.2.7/moap/test/trac/trac/htdocs/.svn/text-base/0000777000076400007640000000000010667100212017325 500000000000000moap-0.2.7/moap/test/trac/trac/htdocs/.svn/entries0000444000076400007640000000026311220253430016735 0000000000000010 dir 398 svn+ssh://thomas.apestaart.org/home/svn/moap/trunk/moap/test/trac/trac/htdocs svn+ssh://thomas.apestaart.org/home/svn/moap 2007-09-03T21:47:28.131562Z 327 thomas moap-0.2.7/moap/test/trac/trac/htdocs/.svn/props/0000777000076400007640000000000010667100212016574 500000000000000moap-0.2.7/moap/test/trac/trac/htdocs/.svn/tmp/0000777000076400007640000000000011220253430016226 500000000000000moap-0.2.7/moap/test/trac/trac/htdocs/.svn/tmp/prop-base/0000777000076400007640000000000010667100212020121 500000000000000moap-0.2.7/moap/test/trac/trac/htdocs/.svn/tmp/text-base/0000777000076400007640000000000010667100212020125 500000000000000moap-0.2.7/moap/test/trac/trac/htdocs/.svn/tmp/props/0000777000076400007640000000000010667100212017374 500000000000000moap-0.2.7/moap/test/trac/trac/db/0000777000076400007640000000000010667100212013646 500000000000000moap-0.2.7/moap/test/trac/trac/db/.svn/0000777000076400007640000000000011220444345014536 500000000000000moap-0.2.7/moap/test/trac/trac/db/.svn/prop-base/0000777000076400007640000000000010667100212016422 500000000000000moap-0.2.7/moap/test/trac/trac/db/.svn/text-base/0000777000076400007640000000000010667100212016426 500000000000000moap-0.2.7/moap/test/trac/trac/db/.svn/entries0000444000076400007640000000025711220253430016041 0000000000000010 dir 398 svn+ssh://thomas.apestaart.org/home/svn/moap/trunk/moap/test/trac/trac/db svn+ssh://thomas.apestaart.org/home/svn/moap 2007-09-03T21:47:28.131562Z 327 thomas moap-0.2.7/moap/test/trac/trac/db/.svn/props/0000777000076400007640000000000010667100212015675 500000000000000moap-0.2.7/moap/test/trac/trac/db/.svn/tmp/0000777000076400007640000000000011220253430015327 500000000000000moap-0.2.7/moap/test/trac/trac/db/.svn/tmp/prop-base/0000777000076400007640000000000010667100212017222 500000000000000moap-0.2.7/moap/test/trac/trac/db/.svn/tmp/text-base/0000777000076400007640000000000010667100212017226 500000000000000moap-0.2.7/moap/test/trac/trac/db/.svn/tmp/props/0000777000076400007640000000000010667100212016475 500000000000000moap-0.2.7/moap/test/trac/trac/README0000664000076400007640000000014210667073661014075 00000000000000This directory contains a Trac environment. Visit http://trac.edgewall.org/ for more information. moap-0.2.7/moap/test/trac/trac/wiki-macros/0000777000076400007640000000000010667100212015506 500000000000000moap-0.2.7/moap/test/trac/trac/wiki-macros/.svn/0000777000076400007640000000000011220444345016376 500000000000000moap-0.2.7/moap/test/trac/trac/wiki-macros/.svn/prop-base/0000777000076400007640000000000010667100212020262 500000000000000moap-0.2.7/moap/test/trac/trac/wiki-macros/.svn/text-base/0000777000076400007640000000000010667100212020266 500000000000000moap-0.2.7/moap/test/trac/trac/wiki-macros/.svn/entries0000444000076400007640000000027011220253430017674 0000000000000010 dir 398 svn+ssh://thomas.apestaart.org/home/svn/moap/trunk/moap/test/trac/trac/wiki-macros svn+ssh://thomas.apestaart.org/home/svn/moap 2007-09-03T21:47:28.131562Z 327 thomas moap-0.2.7/moap/test/trac/trac/wiki-macros/.svn/props/0000777000076400007640000000000010667100212017535 500000000000000moap-0.2.7/moap/test/trac/trac/wiki-macros/.svn/tmp/0000777000076400007640000000000011220253430017167 500000000000000moap-0.2.7/moap/test/trac/trac/wiki-macros/.svn/tmp/prop-base/0000777000076400007640000000000010667100212021062 500000000000000moap-0.2.7/moap/test/trac/trac/wiki-macros/.svn/tmp/text-base/0000777000076400007640000000000010667100212021066 500000000000000moap-0.2.7/moap/test/trac/trac/wiki-macros/.svn/tmp/props/0000777000076400007640000000000010667100212020335 500000000000000moap-0.2.7/moap/test/trac/trac/plugins/0000777000076400007640000000000010667100212014742 500000000000000moap-0.2.7/moap/test/trac/trac/plugins/.svn/0000777000076400007640000000000011220444345015632 500000000000000moap-0.2.7/moap/test/trac/trac/plugins/.svn/prop-base/0000777000076400007640000000000010667100212017516 500000000000000moap-0.2.7/moap/test/trac/trac/plugins/.svn/text-base/0000777000076400007640000000000010667100212017522 500000000000000moap-0.2.7/moap/test/trac/trac/plugins/.svn/entries0000444000076400007640000000026411220253430017133 0000000000000010 dir 398 svn+ssh://thomas.apestaart.org/home/svn/moap/trunk/moap/test/trac/trac/plugins svn+ssh://thomas.apestaart.org/home/svn/moap 2007-09-03T21:47:28.131562Z 327 thomas moap-0.2.7/moap/test/trac/trac/plugins/.svn/props/0000777000076400007640000000000010667100212016771 500000000000000moap-0.2.7/moap/test/trac/trac/plugins/.svn/tmp/0000777000076400007640000000000011220253430016423 500000000000000moap-0.2.7/moap/test/trac/trac/plugins/.svn/tmp/prop-base/0000777000076400007640000000000010667100212020316 500000000000000moap-0.2.7/moap/test/trac/trac/plugins/.svn/tmp/text-base/0000777000076400007640000000000010667100212020322 500000000000000moap-0.2.7/moap/test/trac/trac/plugins/.svn/tmp/props/0000777000076400007640000000000010667100212017571 500000000000000moap-0.2.7/moap/test/trac/trac/attachments/0000777000076400007640000000000010667100212015574 500000000000000moap-0.2.7/moap/test/trac/trac/attachments/.svn/0000777000076400007640000000000011220444345016464 500000000000000moap-0.2.7/moap/test/trac/trac/attachments/.svn/prop-base/0000777000076400007640000000000010667100212020350 500000000000000moap-0.2.7/moap/test/trac/trac/attachments/.svn/text-base/0000777000076400007640000000000010667100212020354 500000000000000moap-0.2.7/moap/test/trac/trac/attachments/.svn/entries0000444000076400007640000000027011220253430017762 0000000000000010 dir 398 svn+ssh://thomas.apestaart.org/home/svn/moap/trunk/moap/test/trac/trac/attachments svn+ssh://thomas.apestaart.org/home/svn/moap 2007-09-03T21:47:28.131562Z 327 thomas moap-0.2.7/moap/test/trac/trac/attachments/.svn/props/0000777000076400007640000000000010667100212017623 500000000000000moap-0.2.7/moap/test/trac/trac/attachments/.svn/tmp/0000777000076400007640000000000011220253430017255 500000000000000moap-0.2.7/moap/test/trac/trac/attachments/.svn/tmp/prop-base/0000777000076400007640000000000010667100212021150 500000000000000moap-0.2.7/moap/test/trac/trac/attachments/.svn/tmp/text-base/0000777000076400007640000000000010667100212021154 500000000000000moap-0.2.7/moap/test/trac/trac/attachments/.svn/tmp/props/0000777000076400007640000000000010667100212020423 500000000000000moap-0.2.7/moap/test/trac/trac/templates/0000777000076400007640000000000010667100212015257 500000000000000moap-0.2.7/moap/test/trac/trac/templates/.svn/0000777000076400007640000000000011220444345016147 500000000000000moap-0.2.7/moap/test/trac/trac/templates/.svn/prop-base/0000777000076400007640000000000010667100212020033 500000000000000moap-0.2.7/moap/test/trac/trac/templates/.svn/text-base/0000777000076400007640000000000010667100361020044 500000000000000moap-0.2.7/moap/test/trac/trac/templates/.svn/text-base/site_newticket.cs.svn-base0000444000076400007640000000022010667073661025051 00000000000000 moap-0.2.7/moap/test/trac/trac/templates/.svn/text-base/site_footer.cs.svn-base0000444000076400007640000000023310667073661024356 00000000000000 moap-0.2.7/moap/test/trac/trac/templates/.svn/text-base/site_css.cs.svn-base0000444000076400007640000000021410667073661023647 00000000000000 moap-0.2.7/moap/test/trac/trac/templates/.svn/text-base/README.svn-base0000444000076400007640000000011310667073661022362 00000000000000This directory contains project-specific custom templates and style sheet. moap-0.2.7/moap/test/trac/trac/templates/.svn/text-base/site_header.cs.svn-base0000444000076400007640000000022110667073661024305 00000000000000 moap-0.2.7/moap/test/trac/trac/templates/.svn/entries0000444000076400007640000000144411220253430017451 0000000000000010 dir 398 svn+ssh://thomas.apestaart.org/home/svn/moap/trunk/moap/test/trac/trac/templates svn+ssh://thomas.apestaart.org/home/svn/moap 2007-09-03T21:47:28.131562Z 327 thomas site_header.cs file 2007-09-03T21:08:01.000000Z cf22385eefd526fcfff56d7b0b73abe1 2007-09-03T21:47:28.131562Z 327 thomas site_css.cs file 2007-09-03T21:08:01.000000Z 60d1540af126ff8cfd356f244d969342 2007-09-03T21:47:28.131562Z 327 thomas site_newticket.cs file 2007-09-03T21:08:01.000000Z f3b3db42573724cfc2f484281459bf81 2007-09-03T21:47:28.131562Z 327 thomas site_footer.cs file 2007-09-03T21:08:01.000000Z c47855b4d482ca79c7b55f5373ae1830 2007-09-03T21:47:28.131562Z 327 thomas README file 2007-09-03T21:08:01.000000Z 94abc89b6de25fe838fa6f7b40ec43a8 2007-09-03T21:47:28.131562Z 327 thomas moap-0.2.7/moap/test/trac/trac/templates/.svn/props/0000777000076400007640000000000010667100212017306 500000000000000moap-0.2.7/moap/test/trac/trac/templates/.svn/tmp/0000777000076400007640000000000011220253430016740 500000000000000moap-0.2.7/moap/test/trac/trac/templates/.svn/tmp/prop-base/0000777000076400007640000000000010667100212020633 500000000000000moap-0.2.7/moap/test/trac/trac/templates/.svn/tmp/text-base/0000777000076400007640000000000010667100361020644 500000000000000moap-0.2.7/moap/test/trac/trac/templates/.svn/tmp/props/0000777000076400007640000000000010667100212020106 500000000000000moap-0.2.7/moap/test/trac/trac/templates/site_header.cs0000664000076400007640000000022110667073661020014 00000000000000 moap-0.2.7/moap/test/trac/trac/templates/README0000664000076400007640000000011310667073661016071 00000000000000This directory contains project-specific custom templates and style sheet. moap-0.2.7/moap/test/trac/trac/templates/site_footer.cs0000664000076400007640000000023310667073661020065 00000000000000 moap-0.2.7/moap/test/trac/trac/templates/site_css.cs0000664000076400007640000000021410667073661017356 00000000000000 moap-0.2.7/moap/test/trac/trac/templates/site_newticket.cs0000664000076400007640000000022010667073661020560 00000000000000 moap-0.2.7/moap/test/trac/db.dump0000664000076400007640000003401710667103316013537 00000000000000BEGIN TRANSACTION; CREATE TABLE system ( name text PRIMARY KEY, value text ); INSERT INTO "system" VALUES('database_version', '20'); INSERT INTO "system" VALUES('youngest_rev', ''); CREATE TABLE permission ( username text, action text, UNIQUE (username,action) ); INSERT INTO "permission" VALUES('anonymous', 'LOG_VIEW'); INSERT INTO "permission" VALUES('anonymous', 'FILE_VIEW'); INSERT INTO "permission" VALUES('anonymous', 'WIKI_VIEW'); INSERT INTO "permission" VALUES('anonymous', 'WIKI_CREATE'); INSERT INTO "permission" VALUES('anonymous', 'WIKI_MODIFY'); INSERT INTO "permission" VALUES('anonymous', 'SEARCH_VIEW'); INSERT INTO "permission" VALUES('anonymous', 'REPORT_VIEW'); INSERT INTO "permission" VALUES('anonymous', 'REPORT_SQL_VIEW'); INSERT INTO "permission" VALUES('anonymous', 'TICKET_VIEW'); INSERT INTO "permission" VALUES('anonymous', 'TICKET_CREATE'); INSERT INTO "permission" VALUES('anonymous', 'TICKET_MODIFY'); INSERT INTO "permission" VALUES('anonymous', 'BROWSER_VIEW'); INSERT INTO "permission" VALUES('anonymous', 'TIMELINE_VIEW'); INSERT INTO "permission" VALUES('anonymous', 'CHANGESET_VIEW'); INSERT INTO "permission" VALUES('anonymous', 'ROADMAP_VIEW'); INSERT INTO "permission" VALUES('anonymous', 'MILESTONE_VIEW'); CREATE TABLE auth_cookie ( cookie text, name text, ipnr text, time integer, UNIQUE (cookie,ipnr,name) ); INSERT INTO "auth_cookie" VALUES('3fa6b59c681d68a20307714a12a02128', 'thomas', '127.0.0.1', 1188854070); INSERT INTO "auth_cookie" VALUES('6d26d7f4e896158b83d8aed95ad66609', 'god', '127.0.0.1', 1188854674); CREATE TABLE session ( sid text, authenticated integer, last_visit integer, UNIQUE (sid,authenticated) ); INSERT INTO "session" VALUES('thomas', 1, 1188853944); INSERT INTO "session" VALUES('god', 1, 1188854674); CREATE TABLE session_attribute ( sid text, authenticated integer, name text, value text, UNIQUE (sid,authenticated,name) ); CREATE TABLE attachment ( type text, id text, filename text, size integer, time integer, description text, author text, ipnr text, UNIQUE (type,id,filename) ); CREATE TABLE wiki ( name text, version integer, time integer, author text, ipnr text, text text, comment text, readonly integer, UNIQUE (name,version) ); INSERT INTO "wiki" VALUES('WikiStart', 1, 1188853681, 'trac', '127.0.0.1', '= Welcome to Trac 0.10.4 = Trac is a ''''''minimalistic'''''' approach to ''''''web-based'''''' management of ''''''software projects''''''. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress. All aspects of Trac have been designed with the single goal to ''''''help developers write great software'''''' while ''''''staying out of the way'''''' and imposing as little as possible on a team''s established process and culture. As all Wiki pages, this page is editable, this means that you can modify the contents of this page simply by using your web-browser. Simply click on the "Edit this page" link at the bottom of the page. WikiFormatting will give you a detailed description of available Wiki formatting commands. "[wiki:TracAdmin trac-admin] ''''yourenvdir'''' initenv" created a new Trac environment, containing a default set of wiki pages and some sample data. This newly created environment also contains [wiki:TracGuide documentation] to help you get started with your project. You can use [wiki:TracAdmin trac-admin] to configure [http://trac.edgewall.org/ Trac] to better fit your project, especially in regard to ''''components'''', ''''versions'''' and ''''milestones''''. TracGuide is a good place to start. Enjoy! [[BR]] ''''The Trac Team'''' == Starting Points == * TracGuide -- Built-in Documentation * [http://trac.edgewall.org/ The Trac project] -- Trac Open Source Project * [http://trac.edgewall.org/wiki/TracFaq Trac FAQ] -- Frequently Asked Questions * TracSupport -- Trac Support For a complete list of local wiki pages, see TitleIndex. ', NULL, NULL); INSERT INTO "wiki" VALUES('WikiStart', 2, 1188854016.73276, 'thomas', '127.0.0.1', 'I didn''t like this page so I deleted it.', '', 0); INSERT INTO "wiki" VALUES('WikiStart', 3, 1188854758.57867, 'god', '127.0.0.1', '== The World == * Seas * Rivers * Mountains * Caves * Forest * Trees * Bunnies ', '', 0); CREATE TABLE revision ( rev text PRIMARY KEY, time integer, author text, message text ); CREATE TABLE node_change ( rev text, path text, node_type text, change_type text, base_path text, base_rev text, UNIQUE (rev,path,change_type) ); CREATE TABLE ticket ( id integer PRIMARY KEY, type text, time integer, changetime integer, component text, severity text, priority text, owner text, reporter text, cc text, version text, milestone text, status text, resolution text, summary text, description text, keywords text ); INSERT INTO "ticket" VALUES(1, 'defect', 1188853968, 1188854721, 'component1', NULL, 'trivial', 'gabriel', 'thomas', 'god,thomas', '', 'milestone2', 'new', NULL, 'This ticket is owned by thomas', 'Yes it is', ''); INSERT INTO "ticket" VALUES(2, 'task', 1188854696, 1188854696, 'component1', NULL, 'major', 'god', 'god', '', '', '', 'new', NULL, 'create the world in six days', 'maybe I could rest on day 7 ?', ''); CREATE TABLE ticket_change ( ticket integer, time integer, author text, field text, oldvalue text, newvalue text, UNIQUE (ticket,time,field) ); INSERT INTO "ticket_change" VALUES(1, 1188854051, 'thomas', 'priority', 'major', 'trivial'); INSERT INTO "ticket_change" VALUES(1, 1188854051, 'thomas', 'milestone', '', 'milestone2'); INSERT INTO "ticket_change" VALUES(1, 1188854051, 'thomas', 'comment', '1', 'It''s not an important ticket.'); INSERT INTO "ticket_change" VALUES(1, 1188854721, 'god', 'comment', '2', 'I''m not sure I want my angel to work on this. Can''t you do it instead ?'); CREATE TABLE ticket_custom ( ticket integer, name text, value text, UNIQUE (ticket,name) ); CREATE TABLE enum ( type text, name text, value text, UNIQUE (type,name) ); INSERT INTO "enum" VALUES('status', 'new', '1'); INSERT INTO "enum" VALUES('status', 'assigned', '2'); INSERT INTO "enum" VALUES('status', 'reopened', '3'); INSERT INTO "enum" VALUES('status', 'closed', '4'); INSERT INTO "enum" VALUES('resolution', 'fixed', '1'); INSERT INTO "enum" VALUES('resolution', 'invalid', '2'); INSERT INTO "enum" VALUES('resolution', 'wontfix', '3'); INSERT INTO "enum" VALUES('resolution', 'duplicate', '4'); INSERT INTO "enum" VALUES('resolution', 'worksforme', '5'); INSERT INTO "enum" VALUES('priority', 'blocker', '1'); INSERT INTO "enum" VALUES('priority', 'critical', '2'); INSERT INTO "enum" VALUES('priority', 'major', '3'); INSERT INTO "enum" VALUES('priority', 'minor', '4'); INSERT INTO "enum" VALUES('priority', 'trivial', '5'); INSERT INTO "enum" VALUES('ticket_type', 'defect', '1'); INSERT INTO "enum" VALUES('ticket_type', 'enhancement', '2'); INSERT INTO "enum" VALUES('ticket_type', 'task', '3'); CREATE TABLE component ( name text PRIMARY KEY, owner text, description text ); INSERT INTO "component" VALUES('component1', 'somebody', NULL); INSERT INTO "component" VALUES('component2', 'somebody', NULL); CREATE TABLE milestone ( name text PRIMARY KEY, due integer, completed integer, description text ); INSERT INTO "milestone" VALUES('milestone1', 0, 0, NULL); INSERT INTO "milestone" VALUES('milestone2', 0, 0, NULL); INSERT INTO "milestone" VALUES('milestone3', 0, 0, NULL); INSERT INTO "milestone" VALUES('milestone4', 0, 0, NULL); CREATE TABLE version ( name text PRIMARY KEY, time integer, description text ); INSERT INTO "version" VALUES('1.0', 0, NULL); INSERT INTO "version" VALUES('2.0', 0, NULL); CREATE TABLE report ( id integer PRIMARY KEY, author text, title text, query text, description text ); INSERT INTO "report" VALUES(1, NULL, 'Active Tickets', ' SELECT p.value AS __color__, id AS ticket, summary, component, version, milestone, t.type AS type, (CASE status WHEN ''assigned'' THEN owner||'' *'' ELSE owner END) AS owner, time AS created, changetime AS _changetime, description AS _description, reporter AS _reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority'' WHERE status IN (''new'', ''assigned'', ''reopened'') ORDER BY p.value, milestone, t.type, time ', ' * List all active tickets by priority. * Color each row based on priority. * If a ticket has been accepted, a ''*'' is appended after the owner''s name '); INSERT INTO "report" VALUES(2, NULL, 'Active Tickets by Version', ' SELECT p.value AS __color__, version AS __group__, id AS ticket, summary, component, version, t.type AS type, (CASE status WHEN ''assigned'' THEN owner||'' *'' ELSE owner END) AS owner, time AS created, changetime AS _changetime, description AS _description, reporter AS _reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority'' WHERE status IN (''new'', ''assigned'', ''reopened'') ORDER BY (version IS NULL),version, p.value, t.type, time ', ' This report shows how to color results by priority, while grouping results by version. Last modification time, description and reporter are included as hidden fields for useful RSS export. '); INSERT INTO "report" VALUES(3, NULL, 'Active Tickets by Milestone', ' SELECT p.value AS __color__, milestone||'' Release'' AS __group__, id AS ticket, summary, component, version, t.type AS type, (CASE status WHEN ''assigned'' THEN owner||'' *'' ELSE owner END) AS owner, time AS created, changetime AS _changetime, description AS _description, reporter AS _reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority'' WHERE status IN (''new'', ''assigned'', ''reopened'') ORDER BY (milestone IS NULL),milestone, p.value, t.type, time ', ' This report shows how to color results by priority, while grouping results by milestone. Last modification time, description and reporter are included as hidden fields for useful RSS export. '); INSERT INTO "report" VALUES(4, NULL, 'Assigned, Active Tickets by Owner', ' SELECT p.value AS __color__, owner AS __group__, id AS ticket, summary, component, milestone, t.type AS type, time AS created, changetime AS _changetime, description AS _description, reporter AS _reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority'' WHERE status = ''assigned'' ORDER BY owner, p.value, t.type, time ', ' List assigned tickets, group by ticket owner, sorted by priority. '); INSERT INTO "report" VALUES(5, NULL, 'Assigned, Active Tickets by Owner (Full Description)', ' SELECT p.value AS __color__, owner AS __group__, id AS ticket, summary, component, milestone, t.type AS type, time AS created, description AS _description_, changetime AS _changetime, reporter AS _reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority'' WHERE status = ''assigned'' ORDER BY owner, p.value, t.type, time ', ' List tickets assigned, group by ticket owner. This report demonstrates the use of full-row display. '); INSERT INTO "report" VALUES(6, NULL, 'All Tickets By Milestone (Including closed)', ' SELECT p.value AS __color__, t.milestone AS __group__, (CASE status WHEN ''closed'' THEN ''color: #777; background: #ddd; border-color: #ccc;'' ELSE (CASE owner WHEN $USER THEN ''font-weight: bold'' END) END) AS __style__, id AS ticket, summary, component, status, resolution,version, t.type AS type, priority, owner, changetime AS modified, time AS _time,reporter AS _reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority'' ORDER BY (milestone IS NULL), milestone DESC, (status = ''closed''), (CASE status WHEN ''closed'' THEN modified ELSE (-1)*p.value END) DESC ', ' A more complex example to show how to make advanced reports. '); INSERT INTO "report" VALUES(7, NULL, 'My Tickets', ' SELECT p.value AS __color__, (CASE status WHEN ''assigned'' THEN ''Assigned'' ELSE ''Owned'' END) AS __group__, id AS ticket, summary, component, version, milestone, t.type AS type, priority, time AS created, changetime AS _changetime, description AS _description, reporter AS _reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority'' WHERE t.status IN (''new'', ''assigned'', ''reopened'') AND owner = $USER ORDER BY (status = ''assigned'') DESC, p.value, milestone, t.type, time ', ' This report demonstrates the use of the automatically set USER dynamic variable, replaced with the username of the logged in user when executed. '); INSERT INTO "report" VALUES(8, NULL, 'Active Tickets, Mine first', ' SELECT p.value AS __color__, (CASE owner WHEN $USER THEN ''My Tickets'' ELSE ''Active Tickets'' END) AS __group__, id AS ticket, summary, component, version, milestone, t.type AS type, (CASE status WHEN ''assigned'' THEN owner||'' *'' ELSE owner END) AS owner, time AS created, changetime AS _changetime, description AS _description, reporter AS _reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority'' WHERE status IN (''new'', ''assigned'', ''reopened'') ORDER BY (owner = $USER) DESC, p.value, milestone, t.type, time ', ' * List all active tickets by priority. * Show all tickets owned by the logged in user in a group first. '); CREATE INDEX session_last_visit_idx ON session (last_visit); CREATE INDEX session_authenticated_idx ON session (authenticated); CREATE INDEX wiki_time_idx ON wiki (time); CREATE INDEX revision_time_idx ON revision (time); CREATE INDEX node_change_rev_idx ON node_change (rev); CREATE INDEX ticket_time_idx ON ticket (time); CREATE INDEX ticket_status_idx ON ticket (status); CREATE INDEX ticket_change_ticket_idx ON ticket_change (ticket); CREATE INDEX ticket_change_time_idx ON ticket_change (time); COMMIT; moap-0.2.7/moap/test/test_util_mail.py0000664000076400007640000000161111220415155014705 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_util_mail -*- # vi:si:et:sw=4:sts=4:ts=4 import os from moap.util import mail from moap.test import common class TestMail(common.TestCase): def testMessage(self): m = mail.Message('subject', 'to', 'from') m.setContent('This is the message.') m.addAttachment('attachment', 'text/plain', 'This is the attachment.') output = m.get() self.failUnless(output.startswith( 'Content-Type: multipart/mixed;')) self.failUnless('MIME-Version: 1.0' in output) self.failUnless('Subject: subject' in output) self.failUnless('To: to' in output) self.failUnless('This is the message.' in output) self.failUnless('Content-Type: text/plain;' in output) self.failUnless('Content-Transfer-Encoding:' in output) self.failUnless('name="attachment"' in output) moap-0.2.7/moap/test/test_vcs_bzr.py0000664000076400007640000001204211220415146014376 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_vcs_bzr -*- # vi:si:et:sw=4:sts=4:ts=4 import os import commands import tempfile from moap.vcs import bzr from moap.test import common class BzrTestCase(common.TestCase): if os.system('bzr --version > /dev/null 2>&1') != 0: skip = "No 'bzr' binary, skipping test." def setUp(self): self.repository = tempfile.mkdtemp(prefix="moap.test.repo.") os.system('bzr init %s' % self.repository) self.checkout = tempfile.mkdtemp(prefix="moap.test.checkout.") os.rmdir(self.checkout) cmd = 'bzr get %s %s' % (self.repository, self.checkout) (status, output) = commands.getstatusoutput(cmd) self.failIf(status, "Non-null status %r" % status) def tearDown(self): os.system('rm -rf %s' % self.checkout) os.system('rm -rf %s' % self.repository) class TestDetect(BzrTestCase): def testDetectRepository(self): # In Bzr-o world, the repository is a branch too self.failUnless(bzr.detect(self.repository)) def testDetectCheckout(self): # should succeed self.failUnless(bzr.detect(self.checkout)) def testHalfCheckout(self): # should fail checkout = tempfile.mkdtemp(prefix="moap.test.") os.mkdir(os.path.join(checkout, '_bzr')) self.failIf(bzr.detect(checkout)) os.system('rm -rf %s' % checkout) class TestCommit(BzrTestCase): def testQuotedCommit(self): filename = os.path.join(self.checkout, 'one_line_file.txt') open(filename, 'w').write('This is one line file.\n') cmd = 'bzr add %s' % filename (status, output) = commands.getstatusoutput(cmd) self.failIf(status, "Non-null status %r" % status) v = bzr.VCSClass(self.checkout) self.failUnless(v) v.commit(['one_line_file.txt', ], "I contain quotes like ' and \"") class TestTree(BzrTestCase): def testBzr(self): v = bzr.VCSClass(self.checkout) self.failUnless(v) paths = ['test/test1.py', 'test/test2.py', 'test/test3/test4.py', 'test5.py', 'test6/', 'test/test7/'] tree = v.createTree(paths) keys = tree.keys() keys.sort() self.assertEquals(keys, ['', 'test', 'test/test3']) self.failUnless('test1.py' in tree['test']) self.failUnless('test2.py' in tree['test']) self.failUnless('test7' in tree['test']) self.failUnless('test4.py' in tree['test/test3']) self.failUnless('test5.py' in tree[''], tree['']) self.failUnless('test6' in tree[''], tree['']) class TestIgnore(BzrTestCase): def testGetUnignored(self): v = bzr.VCSClass(self.checkout) self.failUnless(v) self.assertEquals(v.getUnknown(v.path), []) path = os.path.join(self.checkout, 'test') handle = open(path, 'w') handle.write('test') handle.close() self.assertEquals(v.getUnknown(v.path), ['test']) v.ignore(['test', ]) self.assertEquals(v.getUnknown(v.path), []) class TestEmptyDiff(BzrTestCase): def testDiff(self): v = bzr.VCSClass(self.checkout) self.failUnless(v) self.assertEquals(v.diff(self.checkout), "") class TestDiff(BzrTestCase): def setUp(self): BzrTestCase.setUp(self) filename = os.path.join(self.checkout, 'one_line_file.txt') open(filename, 'w').write('This is one line file.\n') cmd = 'bzr add %s' % filename (status, output) = commands.getstatusoutput(cmd) self.failIf(status, "Non-null status %r" % status) dirname = os.path.join(self.checkout, 'dir') cmd = 'bzr mkdir %s' % dirname (status, output) = commands.getstatusoutput(cmd) self.failIf(status, "Non-null status %r" % status) filename = os.path.join(self.checkout, 'dir', 'two_line_file.txt') open(filename, 'w').write('This is\ntwo line file.\n') cmd = 'bzr add %s' % filename (status, output) = commands.getstatusoutput(cmd) self.failIf(status, "Non-null status %r" % status) def testNonemptyDiff(self): v = bzr.VCSClass(self.checkout) self.failUnless(v) self.failIfEquals(v.diff(self.checkout), '') def testTopLevelDiff(self): v = bzr.VCSClass(self.checkout) self.failUnless(v) diffs = v.getChanges(self.checkout) self.assertEquals(diffs, {'one_line_file.txt': [(0, 0, 1, 1)], 'dir/two_line_file.txt': [(0, 0, 1, 2)]}) def testSubDirDiff(self): v = bzr.VCSClass(self.checkout) self.failUnless(v) dirname = os.path.join(self.checkout, 'dir') diffs = v.getChanges(dirname) self.assertEquals(diffs, {'dir/two_line_file.txt': [(0, 0, 1, 2)]}) def testFileDiff(self): v = bzr.VCSClass(self.checkout) self.failUnless(v) filename = os.path.join(self.checkout, 'one_line_file.txt') diffs = v.getChanges(filename) self.assertEquals(diffs, {'one_line_file.txt': [(0, 0, 1, 1)]}) moap-0.2.7/moap/test/rss/0000777000076400007640000000000011220504670012210 500000000000000moap-0.2.7/moap/test/rss/mach.rss.genshi0000664000076400007640000001115210626014750015047 00000000000000 Release feed for Mach Release feed for Mach http://thomas.apestaart.org/projects/mach/ en Mach 0.9.0 'Cambria' released release-mach-0.9.0 http://thomas.apestaart.org/projects/mach/ Fri, 09 Jun 2006 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.9 'China' released release-mach-0.4.9 http://thomas.apestaart.org/projects/mach/ Sat, 08 Apr 2006 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.8 'More Than One' released release-mach-0.4.8 http://thomas.apestaart.org/projects/mach/ Mon, 21 Nov 2005 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.7 'Long Time No See' released release-mach-0.4.7 http://thomas.apestaart.org/projects/mach/ Sun, 03 Jul 2005 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.6 'Lenrek' released release-mach-0.4.6 http://thomas.apestaart.org/projects/mach/ Tue, 08 Feb 2005 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.5 'Snow' released release-mach-0.4.5 http://thomas.apestaart.org/projects/mach/ Thu, 18 Mar 2004 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.4 'Madrid' released release-mach-0.4.4 http://thomas.apestaart.org/projects/mach/ Thu, 11 Mar 2004 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.3 'Hot Water' released release-mach-0.4.3 http://thomas.apestaart.org/projects/mach/ Tue, 16 Dec 2003 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.2 'No More Betas' released release-mach-0.4.2 http://thomas.apestaart.org/projects/mach/ Tue, 21 Oct 2003 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.1 'Get A Room' released release-mach-0.4.1 http://thomas.apestaart.org/projects/mach/ Fri, 10 Oct 2003 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.0 'Barcelona' released release-mach-0.4.0 http://thomas.apestaart.org/projects/mach/ Mon, 08 Sep 2003 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> moap-0.2.7/moap/test/rss/mach.rss.cheetah0000664000076400007640000001126510626015030015170 00000000000000 Release feed for Mach Release feed for Mach http://thomas.apestaart.org/projects/mach/ en Mach 0.9.0 'Cambria' released release-mach-0.9.0 http://thomas.apestaart.org/projects/mach/ Fri, 09 Jun 2006 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.9 'China' released release-mach-0.4.9 http://thomas.apestaart.org/projects/mach/ Sat, 08 Apr 2006 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.8 'More Than One' released release-mach-0.4.8 http://thomas.apestaart.org/projects/mach/ Mon, 21 Nov 2005 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.7 'Long Time No See' released release-mach-0.4.7 http://thomas.apestaart.org/projects/mach/ Sun, 03 Jul 2005 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.6 'Lenrek' released release-mach-0.4.6 http://thomas.apestaart.org/projects/mach/ Tue, 08 Feb 2005 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.5 'Snow' released release-mach-0.4.5 http://thomas.apestaart.org/projects/mach/ Thu, 18 Mar 2004 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.4 'Madrid' released release-mach-0.4.4 http://thomas.apestaart.org/projects/mach/ Thu, 11 Mar 2004 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.3 'Hot Water' released release-mach-0.4.3 http://thomas.apestaart.org/projects/mach/ Tue, 16 Dec 2003 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.2 'No More Betas' released release-mach-0.4.2 http://thomas.apestaart.org/projects/mach/ Tue, 21 Oct 2003 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.1 'Get A Room' released release-mach-0.4.1 http://thomas.apestaart.org/projects/mach/ Fri, 10 Oct 2003 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> Mach 0.4.0 'Barcelona' released release-mach-0.4.0 http://thomas.apestaart.org/projects/mach/ Mon, 08 Sep 2003 00:00:00 +0000 For more information, visit <A HREF="http://thomas.apestaart.org/projects/mach/">the project homepage</A> moap-0.2.7/moap/test/test_commands_tracadmin.py0000664000076400007640000000364511220415175016564 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_commands_doap -*- # vi:si:et:sw=4:sts=4:ts=4 import os import StringIO import tempfile from twisted.trial import unittest from moap.command import tracadmin from moap.test import common class TestRename(common.TestCase): def setUp(self): try: import trac except ImportError: raise unittest.SkipTest("No trac module, skipping.") self.stdout = StringIO.StringIO() self.command = tracadmin.TracAdmin(stdout=self.stdout) self.trac = tempfile.mkdtemp(prefix='moap.test.trac.') # copy the whole shebang to a temp dir os.system('cp -pr %s/* %s' % ( os.path.join(os.path.dirname(__file__), 'trac', 'trac'), self.trac)) cmd = 'sqlite3 %s/db/trac.db < %s' % ( self.trac, os.path.join(os.path.dirname(__file__), 'trac', 'db.dump')) ret = os.system(cmd) self.assertEquals(ret, 0, "Failed to execute %s" % cmd) def testList(self): ret = self.command.parse(['-p', self.trac, 'user', 'list']) self.assertEquals(ret, 0) self.assertEquals(self.stdout.getvalue(), """gabriel god thomas trac """) def testRename(self): ret = self.command.parse(['-p', self.trac, 'user', 'rename', 'god', 'satan']) self.assertEquals(ret, 0) ret = self.command.parse(['-p', self.trac, 'user', 'list']) self.assertEquals(self.stdout.getvalue(), """gabriel satan thomas trac """) self.stdout.truncate(size=0) ret = self.command.parse(['-p', self.trac, 'user', 'rename', 'trac', 'bugzilla']) self.assertEquals(ret, 0) ret = self.command.parse(['-p', self.trac, 'user', 'list']) self.assertEquals(self.stdout.getvalue(), """bugzilla gabriel satan thomas """) try: import trac except ImportError: TestRename.skip = "No trac module, skipping." moap-0.2.7/moap/test/ChangeLog/0000777000076400007640000000000011031222455013226 500000000000000moap-0.2.7/moap/test/ChangeLog/.svn/0000777000076400007640000000000011220444345014116 500000000000000moap-0.2.7/moap/test/ChangeLog/.svn/prop-base/0000777000076400007640000000000010540745421016011 500000000000000moap-0.2.7/moap/test/ChangeLog/.svn/text-base/0000777000076400007640000000000011031222455016006 500000000000000moap-0.2.7/moap/test/ChangeLog/.svn/text-base/ChangeLog.gst-plugins-base.270.svn-base0000444000076400007640000000065610667056746024736 000000000000002007-03-14 Philippe Kalaf Patch by Olivier Crete * gst-libs/gst/rtp/gstbasertpaudiopayload.c: * gst-libs/gst/rtp/gstbasertpaudiopayload.h: API: add "min-ptime" property to RTP base audio payloader. API: add gst_base_rtp_audio_payload_push(). API: add gst_base_rtp_audio_payload_get_adapter(). Fixes #415001 Indentation/whitespace/documentation fixes. moap-0.2.7/moap/test/ChangeLog/.svn/text-base/ChangeLog.gstreamer.svn-base0000444000076400007640000000060110540745421023203 000000000000002006-07-02 Thomas Vander Stichele * tests/check/gst/gststructure.c: (GST_START_TEST), (gst_structure_suite): Push coverage from 59.04% to 70.00% 2006-07-02 Thomas Vander Stichele * tests/check/Makefile.am: gst-inspect every element; this makes sure that we also get coverage on element's get/set functions moap-0.2.7/moap/test/ChangeLog/.svn/text-base/ChangeLog.notedited.svn-base0000444000076400007640000000045611031222455023172 000000000000002008-05-23 Please set CHANGE_LOG_NAME or REAL_NAME environment variable reviewed by: patch by: * moap/command/cl.py: * moap/test/test_commands_cl.py: moap-0.2.7/moap/test/ChangeLog/.svn/text-base/ChangeLog.moap.2.svn-base0000444000076400007640000000461210577614551022325 000000000000002007-03-20 Thomas Vander Stichele * moap/util/Makefile.am: * moap/util/ctags.py: Add support for parsing ctags files. * moap/test/ctags/tags: * moap/test/Makefile.am: * moap/test/test_util_ctags.py: Add a test for it. * moap/command/cl.py (ChangeLogFile, ChangeLogFile.__init__, Prepare.do): Use tags to generate more detailed ChangeLog entries; wrap them in 72 characters. * moap/vcs/vcs.py (VCS.getChanges): Take diff context lines into account (hardcoded to 3 lines). 2007-03-19 Thomas Vander Stichele * moap/command/cl.py: Add Prepare command. * moap/test/Makefile.am: * moap/test/diff/svn_add_one_line.diff: * moap/test/diff/svn_multiple.diff: Add two svn diff files for testing. * moap/test/test_vcs_svn.py: Add tests. * moap/vcs/vcs.py: implement getChanges 2007-03-19 Thomas Vander Stichele * moap/command/bug.py: * moap/command/code.py: * moap/command/doap.py: pychecker fixes 2007-03-15 Thomas Vander Stichele * etc/bash_completion.d/Makefile.am: regenerate bash_completion file when the moap src dir changes 2007-03-15 Thomas Vander Stichele * moap/command/Makefile.am: * moap/command/code.py: * moap/main.py: Add a "code" subcommand to test and develop code. 2007-02-21 Thomas Vander Stichele * TODO: * moap/command/cl.py: argument to moap cl ci can be either a dir (which contains a ChangeLog file) or an alternate ChangeLog.whatever file 2007-02-09 Thomas Vander Stichele * misc/moap-uninstalled: run with --noprofile so ubuntu has no chance to reset our shell 2007-02-09 Thomas Vander Stichele * etc/bash_completion.d/Makefile.am: make sure we import our version of moap, so that it works without moap installed and without being in the moap env 2007-02-04 Thomas Vander Stichele * configure.ac: back to TRUNK === release 0.2.1 === 2007-02-04 Thomas Vander Stichele * NEWS: * README: * RELEASE: * configure.ac: * moap.doap: releasing 0.2.1, "Ambulance" 2007-02-03 Thomas Vander Stichele * moap/test/test_bash_completion.sh: add unit test for bash completion moap-0.2.7/moap/test/ChangeLog/.svn/text-base/ChangeLog.gst-plugins-base.271.svn-base0000444000076400007640000000022111031222455024675 000000000000002006-09-29 Philippe Kalaf * gst-libs/gst/rtp/gstbasertpaudiopayload.c: Removed empty * between paragraphs moap-0.2.7/moap/test/ChangeLog/.svn/text-base/ChangeLog.gst-plugins-good.svn-base0000444000076400007640000000066410540745421024425 000000000000002006-06-29 Thomas Vander Stichele * tests/check/elements/level.c: (GST_START_TEST): fix a leak, clean up at the end 2006-06-29 Tim-Philipp Müller * gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream), (gst_matroska_demux_send_event), (gst_matroska_demux_loop_stream_parse_id): * gst/matroska/matroska-ids.h: Send tag event after newsegment event. moap-0.2.7/moap/test/ChangeLog/.svn/text-base/ChangeLog.gst-plugins-base.svn-base0000444000076400007640000000127310637557001024406 00000000000000=== release 0.10.10 === 2006-09-07 Thomas Vander Stichele patch by: Michael Smith * gst/tcp/gstmultifdsink.c: (is_sync_frame), (gst_multi_fd_sink_client_queue_buffer), (gst_multi_fd_sink_new_client): * tests/check/elements/multifdsink.c: (GST_START_TEST), (multifdsink_suite): Fix implementation of sync-method 'next-keyframe' Closes #354594 2006-09-07 Thomas Vander Stichele patch by: Wim Taymans * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_start): This patch removes the RANDOM flag that was incorrectly introduced with revision 1.91. Fixes #354590 moap-0.2.7/moap/test/ChangeLog/.svn/text-base/ChangeLog.moap.svn-base0000444000076400007640000000422510540745421022154 000000000000002006-06-15 Thomas Vander Stichele * moap/vcs/svn.py: add to svn:ignore instead of overwriting 2006-06-12 Thomas Vander Stichele * moap/commands/doap.py: adding a "show" command that displays basic info about the project * moap/doap/doap.py: add shortdesc to Project make Doap.path public 2006-06-12 Thomas Vander Stichele * moap/commands/doap.py: add a "doap" subcommand add a "freshmeat" subcommand to it TODO: generalize the Command class, and make it nesteable ? * moap/doap/common.py: common doap funcionality; a quierier * moap/doap/doap.py: a Doap class and various doap element classes * moap/publish/freshmeat.py: code to publisth to freshmeat * moap/test/doap/mach.doap: a sample doap file * moap/test/test_doap_doap.py: test for the doap code 2006-06-11 Thomas Vander Stichele * moap/commands/ignore.py: add a -n, --no-commit option to not commit to repository commit by default * moap/common.py: * moap/test/test_vcs_svn.py: add a test for svn * moap/vcs/cvs.py: implement getNotIgnored() and ignore() * moap/vcs/svn.py: * moap/vcs/vcs.py: moved _createTree from svn to vcs, and make public 2006-06-11 Thomas Vander Stichele * moap/commands/ignore.py: make ignore start the editor and hand the list of to ignore path to VCS.ignore() * moap/common.py: added writeTemp() and editTemp() * moap/vcs/svn.py: implement VCS.ignore() (tested on moap itself) * moap/vcs/vcs.py: add VCS.ignore() to the interface 2006-06-11 Thomas Vander Stichele * SConstruct: 4 hours of work just to figure out that I can't easily do the equivalent of a command target that runs trial moap.test_moap because I *need* source nodes *and* target nodes * moap/common.py: fix getEditor() 2006-06-11 Thomas Vander Stichele * moap/commands/ignore.py: add -l argument * moap/common.py: add getEditor() * moap/test/common.py: * moap/test/test_common.py: add some tests moap-0.2.7/moap/test/ChangeLog/.svn/entries0000444000076400007640000000242011220253430015413 0000000000000010 dir 398 svn+ssh://thomas.apestaart.org/home/svn/moap/trunk/moap/test/ChangeLog svn+ssh://thomas.apestaart.org/home/svn/moap 2008-05-23T09:08:36.313670Z 349 thomas 375192ae-a00c-0410-900a-bafd95fcb19a ChangeLog.gstreamer file 2006-12-16T10:31:45.000000Z 75d4b837235efed33886b1c7a678828f 2006-07-02T08:25:25.752006Z 17 thomas ChangeLog.gst-plugins-base.270 file 2007-09-03T19:17:58.000000Z c73e5c349f70cbf6623d25732e88f3c2 2007-08-13T11:48:07.363520Z 321 thomas ChangeLog.moap file 2006-12-16T10:31:45.000000Z 980ddd2cd2840c995237b5bfa2282aef 2006-07-02T08:25:57.643142Z 18 thomas ChangeLog.moap.2 file 2007-03-19T23:14:49.000000Z 21437f2c9defe6bec9b9497bf4d847e4 2007-03-19T23:22:10.773641Z 132 thomas ChangeLog.gst-plugins-base.271 file 2008-06-27T17:36:45.000000Z a26c8a7c3620194f3262bf57f7bbb73b 2008-05-23T08:35:29.558605Z 346 thomas ChangeLog.notedited file 2008-06-27T17:36:45.000000Z c43595c2c7d18e882bb84e9c836d3968 2008-05-23T09:08:36.313670Z 349 thomas ChangeLog.gst-plugins-good file 2006-12-16T10:31:45.000000Z 8a2965df666f4dd2158e2e364b3004cd 2006-07-02T08:25:57.643142Z 18 thomas ChangeLog.gst-plugins-base file 2007-06-24T21:11:29.000000Z 75bf38a2be27dc1faf179b2614e532d0 2007-06-03T17:45:04.543297Z 268 thomas moap-0.2.7/moap/test/ChangeLog/.svn/props/0000777000076400007640000000000010540745421015264 500000000000000moap-0.2.7/moap/test/ChangeLog/.svn/tmp/0000777000076400007640000000000011220253430014707 500000000000000moap-0.2.7/moap/test/ChangeLog/.svn/tmp/prop-base/0000777000076400007640000000000010540745421016611 500000000000000moap-0.2.7/moap/test/ChangeLog/.svn/tmp/text-base/0000777000076400007640000000000011031222455016606 500000000000000moap-0.2.7/moap/test/ChangeLog/.svn/tmp/props/0000777000076400007640000000000010540745421016064 500000000000000moap-0.2.7/moap/test/ChangeLog/ChangeLog.gst-plugins-base0000664000076400007640000000127310637557001020115 00000000000000=== release 0.10.10 === 2006-09-07 Thomas Vander Stichele patch by: Michael Smith * gst/tcp/gstmultifdsink.c: (is_sync_frame), (gst_multi_fd_sink_client_queue_buffer), (gst_multi_fd_sink_new_client): * tests/check/elements/multifdsink.c: (GST_START_TEST), (multifdsink_suite): Fix implementation of sync-method 'next-keyframe' Closes #354594 2006-09-07 Thomas Vander Stichele patch by: Wim Taymans * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_start): This patch removes the RANDOM flag that was incorrectly introduced with revision 1.91. Fixes #354590 moap-0.2.7/moap/test/ChangeLog/ChangeLog.gst-plugins-base.2710000664000076400007640000000022111031222455020404 000000000000002006-09-29 Philippe Kalaf * gst-libs/gst/rtp/gstbasertpaudiopayload.c: Removed empty * between paragraphs moap-0.2.7/moap/test/ChangeLog/ChangeLog.gst-plugins-base.2700000664000076400007640000000065610667056746020445 000000000000002007-03-14 Philippe Kalaf Patch by Olivier Crete * gst-libs/gst/rtp/gstbasertpaudiopayload.c: * gst-libs/gst/rtp/gstbasertpaudiopayload.h: API: add "min-ptime" property to RTP base audio payloader. API: add gst_base_rtp_audio_payload_push(). API: add gst_base_rtp_audio_payload_get_adapter(). Fixes #415001 Indentation/whitespace/documentation fixes. moap-0.2.7/moap/test/ChangeLog/ChangeLog.gst-plugins-good0000644000076400007640000000066410540745421020132 000000000000002006-06-29 Thomas Vander Stichele * tests/check/elements/level.c: (GST_START_TEST): fix a leak, clean up at the end 2006-06-29 Tim-Philipp Müller * gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream), (gst_matroska_demux_send_event), (gst_matroska_demux_loop_stream_parse_id): * gst/matroska/matroska-ids.h: Send tag event after newsegment event. moap-0.2.7/moap/test/ChangeLog/ChangeLog.gstreamer0000644000076400007640000000060110540745421016710 000000000000002006-07-02 Thomas Vander Stichele * tests/check/gst/gststructure.c: (GST_START_TEST), (gst_structure_suite): Push coverage from 59.04% to 70.00% 2006-07-02 Thomas Vander Stichele * tests/check/Makefile.am: gst-inspect every element; this makes sure that we also get coverage on element's get/set functions moap-0.2.7/moap/test/ChangeLog/ChangeLog.notedited0000664000076400007640000000045611031222455016701 000000000000002008-05-23 Please set CHANGE_LOG_NAME or REAL_NAME environment variable reviewed by: patch by: * moap/command/cl.py: * moap/test/test_commands_cl.py: moap-0.2.7/moap/test/ChangeLog/ChangeLog.moap0000644000076400007640000000422510540745421015661 000000000000002006-06-15 Thomas Vander Stichele * moap/vcs/svn.py: add to svn:ignore instead of overwriting 2006-06-12 Thomas Vander Stichele * moap/commands/doap.py: adding a "show" command that displays basic info about the project * moap/doap/doap.py: add shortdesc to Project make Doap.path public 2006-06-12 Thomas Vander Stichele * moap/commands/doap.py: add a "doap" subcommand add a "freshmeat" subcommand to it TODO: generalize the Command class, and make it nesteable ? * moap/doap/common.py: common doap funcionality; a quierier * moap/doap/doap.py: a Doap class and various doap element classes * moap/publish/freshmeat.py: code to publisth to freshmeat * moap/test/doap/mach.doap: a sample doap file * moap/test/test_doap_doap.py: test for the doap code 2006-06-11 Thomas Vander Stichele * moap/commands/ignore.py: add a -n, --no-commit option to not commit to repository commit by default * moap/common.py: * moap/test/test_vcs_svn.py: add a test for svn * moap/vcs/cvs.py: implement getNotIgnored() and ignore() * moap/vcs/svn.py: * moap/vcs/vcs.py: moved _createTree from svn to vcs, and make public 2006-06-11 Thomas Vander Stichele * moap/commands/ignore.py: make ignore start the editor and hand the list of to ignore path to VCS.ignore() * moap/common.py: added writeTemp() and editTemp() * moap/vcs/svn.py: implement VCS.ignore() (tested on moap itself) * moap/vcs/vcs.py: add VCS.ignore() to the interface 2006-06-11 Thomas Vander Stichele * SConstruct: 4 hours of work just to figure out that I can't easily do the equivalent of a command target that runs trial moap.test_moap because I *need* source nodes *and* target nodes * moap/common.py: fix getEditor() 2006-06-11 Thomas Vander Stichele * moap/commands/ignore.py: add -l argument * moap/common.py: add getEditor() * moap/test/common.py: * moap/test/test_common.py: add some tests moap-0.2.7/moap/test/ChangeLog/ChangeLog.moap.20000664000076400007640000000461210577614551016034 000000000000002007-03-20 Thomas Vander Stichele * moap/util/Makefile.am: * moap/util/ctags.py: Add support for parsing ctags files. * moap/test/ctags/tags: * moap/test/Makefile.am: * moap/test/test_util_ctags.py: Add a test for it. * moap/command/cl.py (ChangeLogFile, ChangeLogFile.__init__, Prepare.do): Use tags to generate more detailed ChangeLog entries; wrap them in 72 characters. * moap/vcs/vcs.py (VCS.getChanges): Take diff context lines into account (hardcoded to 3 lines). 2007-03-19 Thomas Vander Stichele * moap/command/cl.py: Add Prepare command. * moap/test/Makefile.am: * moap/test/diff/svn_add_one_line.diff: * moap/test/diff/svn_multiple.diff: Add two svn diff files for testing. * moap/test/test_vcs_svn.py: Add tests. * moap/vcs/vcs.py: implement getChanges 2007-03-19 Thomas Vander Stichele * moap/command/bug.py: * moap/command/code.py: * moap/command/doap.py: pychecker fixes 2007-03-15 Thomas Vander Stichele * etc/bash_completion.d/Makefile.am: regenerate bash_completion file when the moap src dir changes 2007-03-15 Thomas Vander Stichele * moap/command/Makefile.am: * moap/command/code.py: * moap/main.py: Add a "code" subcommand to test and develop code. 2007-02-21 Thomas Vander Stichele * TODO: * moap/command/cl.py: argument to moap cl ci can be either a dir (which contains a ChangeLog file) or an alternate ChangeLog.whatever file 2007-02-09 Thomas Vander Stichele * misc/moap-uninstalled: run with --noprofile so ubuntu has no chance to reset our shell 2007-02-09 Thomas Vander Stichele * etc/bash_completion.d/Makefile.am: make sure we import our version of moap, so that it works without moap installed and without being in the moap env 2007-02-04 Thomas Vander Stichele * configure.ac: back to TRUNK === release 0.2.1 === 2007-02-04 Thomas Vander Stichele * NEWS: * README: * RELEASE: * configure.ac: * moap.doap: releasing 0.2.1, "Ambulance" 2007-02-03 Thomas Vander Stichele * moap/test/test_bash_completion.sh: add unit test for bash completion moap-0.2.7/moap/test/common.py0000644000076400007640000000435611220415220013157 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import os import tempfile # use twisted if we can so we get nice trial goodness try: from twisted.trial import unittest except ImportError: import unittest from moap.util import log log.init() class TestCase(unittest.TestCase): def setUp(self): # In twisted 1.3 Tester sets caseMethodName on the testCase instance log.debug('unittest', "%s.setUp() for %s" % ( self.__class__.__name__, getattr(self, '_testMethodName', getattr( self, 'caseMethodName', "[unknown method]")))) def tearDown(self): log.debug('unittest', "%s.tearDown() for %s" % ( self.__class__.__name__, getattr(self, '_testMethodName', getattr( self, 'caseMethodName', "[unknown method]")))) class SVNTestCase(TestCase): def createRepository(self): """ Create a svn repository we can use for testing. @rtype: str """ repodir = self.createDirectory('repo') log.debug('unittest', 'creating temp repo in %s' % repodir) value = os.system('svnadmin create %s' % repodir) self.assertEquals(value, 0, "Could not execute svnadmin") return repodir def createLive(self): """ Create a "live" area where we can store files for testing. @rtype: str """ livedir = self.createDirectory('live') log.debug('unittest', 'creating live area in %s' % livedir) value = os.system('mkdir -p %s' % livedir) self.assertEquals(value, 0, "Could not create %s" % livedir) return livedir def createDirectory(self, name): """ Create a directory using the given name as part of the name. @rtype: str """ return tempfile.mkdtemp(suffix=".%s.svn.test" % name) def liveWriteFile(self, livePath, data): path = os.path.join(self.livedir, livePath) handle = open(path, "w") handle.write(data) handle.close() return path def liveCreateDirectory(self, livePath): path = os.path.join(self.livedir, livePath) os.mkdir(path) return path class FakeStdOut: def write(self, what): pass moap-0.2.7/moap/test/Makefile.in0000664000076400007640000002456411220504524013375 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = moap/test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = *.py{c,o} EXTRA_DIST = \ __init__.py \ common.py \ test_bug_bugzilla.py \ test_commands_cl.py \ test_commands_doap.py \ test_commands_tracadmin.py \ test_doap_doap.py \ test_util_ctags.py \ test_util_distro.py \ test_util_mail.py \ test_util_usermap.py \ test_util_util.py \ test_vcs_bzr.py \ test_vcs_cvs.py \ test_vcs_darcs.py \ test_vcs_git.py \ test_vcs_svn.py \ test_vcs_git_svn.py \ test_bash_completion.sh \ ChangeLog \ ChangeLog/ChangeLog.moap \ ChangeLog/ChangeLog.moap.2 \ ChangeLog/ChangeLog.gstreamer \ ChangeLog/ChangeLog.gst-plugins-base \ ChangeLog/ChangeLog.gst-plugins-base.270 \ ChangeLog/ChangeLog.gst-plugins-base.271 \ ChangeLog/ChangeLog.gst-plugins-good \ ChangeLog/ChangeLog.notedited \ doap/mach.doap \ ical/mach.ics \ rss/mach.rss.cheetah \ rss/mach.rss.genshi \ diff/svn_add_one_line.diff \ diff/svn_add_first_last_line.diff \ diff/svn_multiple.diff \ prepare/mail.py \ prepare/mail.patch \ trac/trac/conf \ trac/trac/conf/trac.ini.sample \ trac/trac/conf/trac.ini \ trac/trac/VERSION \ trac/trac/db \ trac/trac/plugins \ trac/trac/attachments \ trac/trac/wiki-macros \ trac/trac/log \ trac/trac/README \ trac/trac/templates \ trac/trac/templates/site_footer.cs \ trac/trac/templates/site_newticket.cs \ trac/trac/templates/site_header.cs \ trac/trac/templates/README \ trac/trac/templates/site_css.cs \ trac/trac/htdocs \ trac/db.dump all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu moap/test/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu moap/test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # re-generation of test files when needed regenerate: rss/mach.rss.cheetah.regenerate rss/mach.rss.genshi.regenerate ical/mach.ics.regenerate bugzilla/gst-plugins-base-0.10.2.csv.regenerate %.regenerate: rm $* make $* rss/mach.rss.cheetah: moap doap -f doap/mach.doap rss -t cheetah > $@ rss/mach.rss.genshi: moap doap -f doap/mach.doap rss -t genshi > $@ ical/mach.ics: moap doap -f doap/mach.doap ical > $@ bugzilla/gst-plugins-base-0.10.2.csv: wget -O $@ "http://bugzilla.gnome.org/buglist.cgi?product=GStreamer&component=gst-plugins-base&target_milestone=0.10.2&resolution=FIXED&ctype=csv&&query_format=advanced" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/moap/test/test_util_ctags.py0000664000076400007640000000634511220415165015076 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_doap_doap -*- # vi:si:et:sw=4:sts=4:ts=4 import os from moap.util import ctags from moap.test import common class TestTag(common.TestCase): def setUp(self): self.tag = ctags.Tag() def testRepr(self): self.failUnless(repr(self.tag)) def testParse(self): self.tag.parse('diff\tmoap/vcs/cvs.py\t/^ def diff(self, path):$/;"\tm\tline:98\tlanguage:Python\tclass:CVS') self.assertEquals(self.tag.name, "diff") self.assertEquals(self.tag.file, "moap/vcs/cvs.py") self.assertEquals(self.tag.line, 98) self.assertEquals(self.tag.language, 'Python') self.assertEquals(self.tag.klazz, 'CVS') def test281(self): # in moap.util.ctags, the tagMatcher originally had non-spaces for # the first column; ticket 281 has a space in the first column. self.tag.parse('line operator =\t/home/murrayc/svn/gnome220/branches/glom-1-6/glom/libglom/data_structure/field.cc\t/^Field& Field::operator=(const Field& src)$/;"\tf\tline:58\tlanguage:C++\tclass:Glom::Field\tsignature:(const Field& src)') class TestCTags(common.TestCase): def setUp(self): file = os.path.join(os.path.dirname(__file__), 'ctags', 'tags') self.ctags = ctags.CTags() self.ctags.addFile(file) def testGetManyTags(self): tags = self.ctags.getTags('moap/vcs/cvs.py', 93, 11) self.assertEquals(tags[0].name, 'commit') self.assertEquals(tags[1].name, 'diff') def testGetBeforeFirstTag(self): # asking for tags before there are any should return no tags tags = self.ctags.getTags('moap/vcs/cvs.py', 5, 6) self.failIf(tags) def testGetWithFirstTag(self): # asking for tags before and in first tag should give first tag tags = self.ctags.getTags('moap/vcs/cvs.py', 15, 6) self.assertEquals(len(tags), 1) self.assertEquals(tags[0].name, 'detect') def testGetTagBeforeTagLine(self): tags = self.ctags.getTags('moap/vcs/cvs.py', 15) self.failIf(tags) def testGetTagOnTagLine(self): tags = self.ctags.getTags('moap/vcs/cvs.py', 16) self.assertEquals(len(tags), 1) self.assertEquals(tags[0].name, 'detect') def testGetTagAfterTagLine(self): tags = self.ctags.getTags('moap/vcs/cvs.py', 17) self.assertEquals(len(tags), 1) self.assertEquals(tags[0].name, 'detect') def testGetLastTwo(self): # update starts on 106 tags = self.ctags.getTags('moap/vcs/cvs.py', 105, 2) self.assertEquals(len(tags), 2) self.assertEquals(tags[0].name, 'diff') self.assertEquals(tags[1].name, 'update') def testGetLastTag(self): tags = self.ctags.getTags('moap/vcs/cvs.py', 106) self.assertEquals(len(tags), 1) self.assertEquals(tags[0].name, 'update') class TestCTagsFromString(common.TestCase): def testFromEmptyString(self): self.ctags = ctags.CTags() self.ctags.addString('') def testFromString(self): self.ctags = ctags.CTags() self.ctags.addString('!_TAG_') def testFromWrongString(self): self.ctags = ctags.CTags() self.assertRaises(KeyError, self.ctags.addString, 'wrongtype') moap-0.2.7/moap/test/doap/0000777000076400007640000000000011220504670012324 500000000000000moap-0.2.7/moap/test/doap/mach.doap0000644000076400007640000001502310540745421014023 00000000000000 Mach mach 2002-06-06 mach makes chroots mach allows you to set up clean roots from scratch for any distribution or distribution variation supported. Currently, this is limited to RPM-based distributions. This clean build root can be used for making clean packages, running jailed services, testing builds, or making disk images of clean roots. python :pserver:anonymous@cvs.sourceforge.net:/cvs/mach mach2 0.9.0 2 Cambria 2006-06-09 0.4.9 2 China 2006-04-08 0.4.8 2 More Than One 2005-11-21 0.4.7 2 Long Time No See 2005-07-03 0.4.6 2 Lenrek 2005-02-08 0.4.5 2 Snow 2004-03-18 0.4.4 2 Madrid 2004-03-11 0.4.3 2 Hot Water 2003-12-16 0.4.2 2 No More Betas 2003-10-21 0.4.1 2 Get A Room 2003-10-10 0.4.0 2 Barcelona 2003-09-08 Thomas Vander Stichele moap-0.2.7/moap/test/test_commands_cl.py0000664000076400007640000004556411220443507015226 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_commands_cl -*- # vi:si:et:sw=4:sts=4:ts=4 import os import time import StringIO from moap.test import common from moap.util import log from moap.command import cl class TestClMoap1(common.TestCase): def setUp(self): file = os.path.join(os.path.dirname(__file__), 'ChangeLog', 'ChangeLog.moap') self.cl = cl.ChangeLogFile(file) self.cl.parse() def testGetEntry0(self): e = self.cl.getEntry(0) self.assertEquals(e.date, "2006-06-15") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") self.assertEquals(len(e.files), 1) self.assertEquals(e.files, ["moap/vcs/svn.py"]) # we don't want the empty line because text ends in \n lines = e.text.split("\n")[:-1] self.assertEquals(len(lines), 2) def testGetEntry1(self): e = self.cl.getEntry(1) self.assertEquals(e.date, "2006-06-12") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") self.assertEquals(len(e.files), 2) self.assertEquals(e.files, [ "moap/commands/doap.py", "moap/doap/doap.py", ]) def testFind(self): searchTerms = ['show'] entries = self.cl.find(searchTerms) self.assertEquals(len(entries), 1) e = entries[0] self.assertEquals(e.date, "2006-06-12") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") def testFindByNameAndDate(self): searchTerms = ['Thomas', '2006', 'show'] entries = self.cl.find(searchTerms) self.assertEquals(len(entries), 1) e = entries[0] self.assertEquals(e.date, "2006-06-12") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") def testFindCaseInsEnSiTiVE(self): searchTerms = ['SHOW'] entries = self.cl.find(searchTerms) self.assertEquals(len(entries), 1) e = entries[0] self.assertEquals(e.date, "2006-06-12") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") def testFindCaseSensitive(self): searchTerms = ['SHOW'] entries = self.cl.find(searchTerms, caseSensitive=True) self.assertEquals(len(entries), 0) searchTerms = ['show'] entries = self.cl.find(searchTerms, caseSensitive=True) self.assertEquals(len(entries), 1) e = entries[0] self.assertEquals(e.date, "2006-06-12") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") def testFindMultiple(self): searchTerms = ['svn.py'] entries = self.cl.find(searchTerms) self.assertEquals(len(entries), 3) e = entries[0] self.assertEquals(e.date, "2006-06-15") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") e = entries[1] self.assertEquals(e.date, "2006-06-11") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") e = entries[2] self.assertEquals(e.date, "2006-06-11") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") searchTerms = ['svn.py', '--no-commit'] entries = self.cl.find(searchTerms) self.assertEquals(len(entries), 1) e = entries[0] self.assertEquals(e.date, "2006-06-11") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") searchTerms = ['svn.py', 'foobar'] entries = self.cl.find(searchTerms) self.assertEquals(len(entries), 0) class TestClGstPluginsGood(common.TestCase): def setUp(self): file = os.path.join(os.path.dirname(__file__), 'ChangeLog', 'ChangeLog.gst-plugins-good') self.cl = cl.ChangeLogFile(file) self.cl.parse() def testGetEntry0(self): e = self.cl.getEntry(0) self.assertEquals(e.date, "2006-06-29") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") self.assertEquals(len(e.files), 1) self.assertEquals(e.files, ["tests/check/elements/level.c"]) # we don't want the empty line because text ends in \n lines = e.text.split("\n")[:-1] self.assertEquals(len(lines), 2) class TestClGstreamer(common.TestCase): def setUp(self): file = os.path.join(os.path.dirname(__file__), 'ChangeLog', 'ChangeLog.gstreamer') self.cl = cl.ChangeLogFile(file) self.cl.parse() def testGetEntry0(self): e = self.cl.getEntry(0) self.assertEquals(e.date, "2006-07-02") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") self.assertEquals(len(e.files), 1) self.assertEquals(e.files, ["tests/check/gst/gststructure.c"]) # we don't want the empty line because text ends in \n lines = e.text.split("\n")[:-1] self.assertEquals(len(lines), 3) class TestClGstPluginsBase(common.TestCase): def setUp(self): self.file = os.path.join(os.path.dirname(__file__), 'ChangeLog', 'ChangeLog.gst-plugins-base') self.cl = cl.ChangeLogFile(self.file) self.cl.parse() def testGetRelease(self): e = self.cl.getEntry(0) self.assertEquals(e.version, "0.10.10") def testGetContributors(self): e = self.cl.getEntry(1) self.assertEquals(e.contributors, ["Michael Smith", ]) def testContributors(self): stdout = StringIO.StringIO() c = cl.ChangeLog(stdout=stdout) ret = c.parse(['-C', self.file, 'contributors']) self.assertEquals(ret, 0) self.assertEquals(stdout.getvalue(), "\n") def testContributorsRelease(self): stdout = StringIO.StringIO() c = cl.ChangeLog(stdout=stdout) ret = c.parse(['-C', self.file, 'contributors', '-r', '0.10.10']) self.assertEquals(ret, 0) self.assertEquals(stdout.getvalue(), """Michael Smith Thomas Vander Stichele Wim Taymans """) def testFind(self): stdout = StringIO.StringIO() c = cl.ChangeLog(stdout=stdout) ret = c.parse(['-C', self.file, 'find', 'gnomevfs', ]) self.assertEquals(ret, 0) self.assertEquals(stdout.getvalue(), """2006-09-07 Thomas Vander Stichele \tpatch by: Wim Taymans \t* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_start): \tThis patch removes the RANDOM flag that was incorrectly introduced with \trevision 1.91. Fixes #354590 """) def testFindMultiple(self): stdout = StringIO.StringIO() c = cl.ChangeLog(stdout=stdout) ret = c.parse(['-C', self.file, 'find', 'gst', ]) self.assertEquals(ret, 0) self.assertEquals(stdout.getvalue(), """2006-09-07 Thomas Vander Stichele \tpatch by: Michael Smith \t* gst/tcp/gstmultifdsink.c: (is_sync_frame), \t(gst_multi_fd_sink_client_queue_buffer), \t(gst_multi_fd_sink_new_client): \t* tests/check/elements/multifdsink.c: (GST_START_TEST), \t(multifdsink_suite): \t Fix implementation of sync-method 'next-keyframe' \t Closes #354594 2006-09-07 Thomas Vander Stichele \tpatch by: Wim Taymans \t* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_start): \tThis patch removes the RANDOM flag that was incorrectly introduced with \trevision 1.91. Fixes #354590 """) stdout = StringIO.StringIO() c = cl.ChangeLog(stdout=stdout) ret = c.parse(['-C', self.file, 'find', 'gst', 'gnomevfs', ]) self.assertEquals(ret, 0) self.assertEquals(stdout.getvalue(), """2006-09-07 Thomas Vander Stichele \tpatch by: Wim Taymans \t* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_start): \tThis patch removes the RANDOM flag that was incorrectly introduced with \trevision 1.91. Fixes #354590 """) stdout = StringIO.StringIO() c = cl.ChangeLog(stdout=stdout) ret = c.parse(['-C', self.file, 'find', 'gst', 'jpegdec', ]) self.assertEquals(ret, 0) self.assertEquals(stdout.getvalue(), "") class TestClGstPluginsBase270(common.TestCase): def setUp(self): self.file = os.path.join(os.path.dirname(__file__), 'ChangeLog', 'ChangeLog.gst-plugins-base.270') self.cl = cl.ChangeLogFile(self.file) self.cl.parse() def testGetContributors(self): e = self.cl.getEntry(0) # because it's written Patch by and not Patch by: it fails to find # contributors self.assertEquals(e.contributors, []) def testFind(self): stdout = StringIO.StringIO() c = cl.ChangeLog(stdout=stdout) ret = c.parse(['-C', self.file, 'find', 'ogg', ]) self.assertEquals(ret, 0) self.assertEquals(stdout.getvalue(), "") # In ticket #271, the trailing space in the date/name/address line used to # cause misparsing class TestClGstPluginsBase271(common.TestCase): def setUp(self): self.file = os.path.join(os.path.dirname(__file__), 'ChangeLog', 'ChangeLog.gst-plugins-base.271') self.cl = cl.ChangeLogFile(self.file) self.cl.parse() def testGetContributors(self): e = self.cl.getEntry(0) self.assertEquals(e.date, "2006-09-29") self.assertEquals(e.name, "Philippe Kalaf") self.assertEquals(e.address, "philippe.kalaf@collabora.co.uk") class TestCheckin(common.SVNTestCase): def setUp(self): common.SVNTestCase.setUp(self) self.repodir = self.createRepository() self.livedir = self.createLive() def tearDown(self): log.debug('unittest', 'removing temp repodir in %s' % self.repodir) os.system('rm -rf %s' % self.repodir) log.debug('unittest', 'removing temp livedir in %s' % self.livedir) os.system('rm -rf %s' % self.livedir) common.SVNTestCase.tearDown(self) def testCheckinNewDirectory(self): # test a moap cl ci when a parent directory has just been added, # and is not listed in the ChangeLog of course os.system('svn co file://%s %s > /dev/null' % ( self.repodir, self.livedir)) self.liveCreateDirectory('src') self.liveWriteFile('src/test', 'some contents') self.liveWriteFile('ChangeLog', '') os.system('svn add %s > /dev/null' % os.path.join( self.livedir, 'ChangeLog')) os.system('svn add %s > /dev/null' % os.path.join(self.livedir, 'src')) self.liveWriteFile('ChangeLog', """2006-08-15 Thomas Vander Stichele \t* src/test: \t some content """) # FIXME: setting stdout and stderr doesn't work yet c = cl.ChangeLog(stdout=open('/dev/null'), stderr=open('/dev/null')) ret = c.parse(['-C', self.livedir, 'checkin']) self.assertEquals(ret, 0) def testPrepareDiff(self): # Override any externally set CHANGE_LOG_NAME and _EMAIL_ADDRESS os.environ['CHANGE_LOG_NAME'] = 'Hugo van der Hardcore' os.environ['CHANGE_LOG_EMAIL_ADDRESS'] ='hugo@ninenin.jas' os.system('svn co file://%s %s > /dev/null' % ( self.repodir, self.livedir)) self.liveWriteFile('ChangeLog', '') os.system('svn add %s > /dev/null' % os.path.join(self.livedir, 'ChangeLog')) self.liveWriteFile('test', '') os.system('svn add %s > /dev/null' % os.path.join(self.livedir, 'test')) os.system('svn commit -m "add" %s' % os.path.join(self.livedir)) self.liveWriteFile('test', 'some contents') # FIXME: this fails because an empty ChangeLog causes tracebacks # c = cl.Diff() # print c.do([self.livedir, ]) log.debug('unittest', 'moap cl prep -c') c = cl.ChangeLog(stdout=common.FakeStdOut()) c.parse(['-C', self.livedir, 'prepare', '-c', ]) # FIXME: the diff command will diff relative paths; # so running just moap cl diff will not actually change to the repo # path and fail to show diffs oldPath = os.getcwd() os.chdir(self.livedir) log.debug('unittest', 'moap cl diff') stdout = StringIO.StringIO() c = cl.ChangeLog(stdout=stdout) c.parse(['-C', self.livedir, 'diff', ]) os.chdir(oldPath) firstline = time.strftime('%Y-%m-%d') + ' ' + \ 'Hugo van der Hardcore' + ' <' + 'hugo@ninenin.jas' + '>' expected = firstline + """ \treviewed by: \tpatch by: \t* test: Index: test =================================================================== --- test\t(revision 1) +++ test\t(working copy) @@ -0,0 +1 @@ +some contents \ No newline at end of file """ # skip the date l = len("2007-07-30") self.assertEquals(stdout.getvalue()[l:], expected[l:]) def testDoubleDiff(self): # see https://thomas.apestaart.org/moap/trac/ticket/303 # Override any externally set CHANGE_LOG_NAME and _EMAIL_ADDRESS os.environ['CHANGE_LOG_NAME'] = 'Hugo van der Hardcore' os.environ['CHANGE_LOG_EMAIL_ADDRESS'] ='hugo@ninenin.jas' os.system('svn co file://%s %s > /dev/null' % ( self.repodir, self.livedir)) self.liveWriteFile('ChangeLog', '') os.system('svn add %s > /dev/null' % os.path.join(self.livedir, 'ChangeLog')) self.liveWriteFile('test', '') os.system('svn add %s > /dev/null' % os.path.join(self.livedir, 'test')) os.system('svn commit -m "add" %s' % os.path.join(self.livedir)) self.liveWriteFile('test', 'some contents') log.debug('unittest', 'moap cl prep -c') c = cl.ChangeLog(stdout=common.FakeStdOut()) c.parse(['-C', self.livedir, 'prepare', '-c', ]) # add the test file a second time handle = open(os.path.join(self.livedir, 'ChangeLog'), 'a') handle.write('\t* test:\n') handle.close() # FIXME: the diff command will diff relative paths; # so running just moap cl diff will not actually change to the repo # path and fail to show diffs oldPath = os.getcwd() os.chdir(self.livedir) log.debug('unittest', 'moap cl diff') stdout = StringIO.StringIO() c = cl.ChangeLog(stdout=stdout) c.parse(['-C', self.livedir, 'diff', ]) os.chdir(oldPath) firstline = time.strftime('%Y-%m-%d') + ' ' + \ 'Hugo van der Hardcore' + ' <' + 'hugo@ninenin.jas' + '>' expected = firstline + """ \treviewed by: \tpatch by: \t* test: \t* test: Index: test =================================================================== --- test\t(revision 1) +++ test\t(working copy) @@ -0,0 +1 @@ +some contents \ No newline at end of file """ # skip the date l = len("2007-07-30") self.assertEquals(stdout.getvalue()[l:], expected[l:]) def testPrepareTagged(self): # test an actual patch set commited to moap to see if # we extract tags correctly. os.system('svn co file://%s %s > /dev/null' % ( self.repodir, self.livedir)) # copy and add mail.py file = os.path.join(os.path.dirname(__file__), 'prepare', 'mail.py') os.system("cp %s %s" % (file, self.livedir)) codePath = os.path.join(self.livedir, 'mail.py') os.system('svn add %s' % codePath) os.system('svn commit -m "add" %s' % self.livedir) # patch it patchPath = os.path.join(os.path.dirname(__file__), 'prepare', 'mail.patch') os.system('patch %s < %s' % (codePath, patchPath)) # prepare entry log.debug('unittest', 'moap cl prep -c') c = cl.ChangeLog(stdout=common.FakeStdOut()) # try the version of prepare that allows you to pass the path c.parse(['prepare', '-c', self.livedir, ]) # now check the fresh ChangeLog entry ChangeLog = os.path.join(self.livedir, "ChangeLog") lines = open(ChangeLog, 'r').readlines() # FIXME: Message.send is in here because the diff marks a line # of whitespace before the new Message.mailto method as added; # we should filter this by parsing the diff better and only looking # for affected tags within blocks of non-whitespace, # or better defining (nested) location (ie, including end) for tags self.assertEquals(lines[5], "\t* mail.py " "(Message.__init__, Message.setFromm, Message.send,\n") self.assertEquals(lines[6], "\t Message.mailto):\n") class TestClMoap2(common.TestCase): def setUp(self): file = os.path.join(os.path.dirname(__file__), 'ChangeLog', 'ChangeLog.moap.2') self.cl = cl.ChangeLogFile(file) self.cl.parse() def testGetEntry0(self): e = self.cl.getEntry(0) self.assertEquals(e.date, "2007-03-20") self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") self.assertEquals(len(e.files), 7) self.assertEquals(e.files[0], "moap/util/Makefile.am") self.assertEquals(e.files[6], "moap/vcs/vcs.py") # we don't want the empty line because text ends in \n lines = e.text.split("\n")[:-1] self.assertEquals(len(lines), 13) def testFindByVersion(self): searchTerms = ['0.2.1'] entries = self.cl.find(searchTerms) self.assertEquals(len(entries), 2) e = entries[0] self.assertEquals(e.version, "0.2.1") e = entries[1] self.assertEquals(e.name, "Thomas Vander Stichele") self.assertEquals(e.address, "thomas at apestaart dot org") class TestClNotEdited(common.TestCase): def setUp(self): file = os.path.join(os.path.dirname(__file__), 'ChangeLog', 'ChangeLog.notedited') self.cl = cl.ChangeLogFile(file) self.cl.parse() def testGetBadEntry(self): entry = self.cl.getEntry(0) self.failUnless(isinstance(entry, cl.ChangeEntry)) self.failUnless("mail" in entry.notEdited) self.failUnless("name" in entry.notEdited) self.failUnless("patched by" in entry.notEdited) self.failUnless("reviewer" in entry.notEdited) moap-0.2.7/moap/test/test_bash_completion.sh0000775000076400007640000000425311035702107016066 00000000000000#!/bin/bash # test completion # call with the completion file as the first argument . $1 # helper functions assert_equals() { if [[ "$1" != "$2" ]]; then echo "Result '$1' != expected '$2'" exit 1 fi } # run the given function as a test and output test() { echo -n " $1 ... " $1 if [[ $! -eq 0 ]]; then echo "[OK]" else echo "[FAILED]" fi } # tests test_moap() { unset COMPREPLY _moap_complete_moap "moap " assert_equals "${COMPREPLY[*]}" "bug changelog code doap ignore tracadmin vcs" # completing a partial command will still return all possible commands # bash will filter unset COMPREPLY _moap_complete_moap "moap do" assert_equals "${COMPREPLY[*]}" "bug changelog code doap ignore tracadmin vcs" # complete options unset COMPREPLY _moap_complete_moap moap - assert_equals "${COMPREPLY[*]}" "--help --version -h -v" # complete options unset COMPREPLY _moap_complete_moap moap -- assert_equals "${COMPREPLY[*]}" "--help --version" # complete partial long options unset COMPREPLY _moap_complete_moap moap --ver assert_equals "${COMPREPLY[*]}" "--version" # complete commands with an argumentless option already specified unset COMPREPLY _moap_complete_moap moap --version assert_equals "${COMPREPLY[*]}" "bug changelog code doap ignore tracadmin vcs" } test_moap_doap() { unset COMPREPLY _moap_complete_moap moap doa assert_equals "${COMPREPLY[*]}" "doap" unset COMPREPLY _moap_complete_moap moap doap assert_equals "${COMPREPLY[*]}" "bug freshmeat ical mail rss search show" unset COMPREPLY _moap_complete_moap moap doap --ve assert_equals "${COMPREPLY[*]}" "--version" # complete commands with an argumented option without the argument unset COMPREPLY _moap_complete_moap moap doap --version assert_equals "${COMPREPLY[*]}" "" # complete commands with an argumented option already specified unset COMPREPLY _moap_complete_moap moap doap --version 0.9.1 assert_equals "${COMPREPLY[*]}" "bug freshmeat ical mail rss search show" } test "test_moap" test "test_moap_doap" moap-0.2.7/moap/test/ical/0000777000076400007640000000000011220504670012311 500000000000000moap-0.2.7/moap/test/ical/mach.ics0000664000076400007640000000371610626006356013655 00000000000000BEGIN:VCALENDAR PRODID:-//thomas.apestaart.org//moap//EN VERSION:2.0 BEGIN:VEVENT SUMMARY:Mach 0.4.0 'Barcelona' released UID:2003-09-08-mach-0.4.0@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20030908 DTEND;VALUE=DATE:20030908 END:VEVENT BEGIN:VEVENT SUMMARY:Mach 0.4.1 'Get A Room' released UID:2003-10-10-mach-0.4.1@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20031010 DTEND;VALUE=DATE:20031010 END:VEVENT BEGIN:VEVENT SUMMARY:Mach 0.4.2 'No More Betas' released UID:2003-10-21-mach-0.4.2@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20031021 DTEND;VALUE=DATE:20031021 END:VEVENT BEGIN:VEVENT SUMMARY:Mach 0.4.3 'Hot Water' released UID:2003-12-16-mach-0.4.3@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20031216 DTEND;VALUE=DATE:20031216 END:VEVENT BEGIN:VEVENT SUMMARY:Mach 0.4.4 'Madrid' released UID:2004-03-11-mach-0.4.4@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20040311 DTEND;VALUE=DATE:20040311 END:VEVENT BEGIN:VEVENT SUMMARY:Mach 0.4.5 'Snow' released UID:2004-03-18-mach-0.4.5@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20040318 DTEND;VALUE=DATE:20040318 END:VEVENT BEGIN:VEVENT SUMMARY:Mach 0.4.6 'Lenrek' released UID:2005-02-08-mach-0.4.6@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20050208 DTEND;VALUE=DATE:20050208 END:VEVENT BEGIN:VEVENT SUMMARY:Mach 0.4.7 'Long Time No See' released UID:2005-07-03-mach-0.4.7@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20050703 DTEND;VALUE=DATE:20050703 END:VEVENT BEGIN:VEVENT SUMMARY:Mach 0.4.8 'More Than One' released UID:2005-11-21-mach-0.4.8@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20051121 DTEND;VALUE=DATE:20051121 END:VEVENT BEGIN:VEVENT SUMMARY:Mach 0.4.9 'China' released UID:2006-04-08-mach-0.4.9@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20060408 DTEND;VALUE=DATE:20060408 END:VEVENT BEGIN:VEVENT SUMMARY:Mach 0.9.0 'Cambria' released UID:2006-06-09-mach-0.9.0@moap CLASS:PUBLIC PRIORITY:3 DTSTART;VALUE=DATE:20060609 DTEND;VALUE=DATE:20060609 END:VEVENT END:VCALENDAR moap-0.2.7/moap/test/test_util_distro.py0000664000076400007640000000111411220415160015261 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_doap_doap -*- # vi:si:et:sw=4:sts=4:ts=4 import os from moap.util import distro from moap.test import common class TestRelease(common.TestCase): def testGet(self): distro.getDistroFromRelease() class TestAtLeast(common.TestCase): def testFedora(self): d = distro.Distro('fedora', 'Fedora Core', '5', 'i386') self.failUnless(d.atLeast('4test2')) self.failUnless(d.atLeast('5')) self.failIf(d.atLeast('5test2')) self.failIf(d.atLeast('40')) self.failIf(d.atLeast('50')) moap-0.2.7/moap/test/prepare/0000777000076400007640000000000011220504670013037 500000000000000moap-0.2.7/moap/test/prepare/mail.patch0000664000076400007640000000350410615152720014724 00000000000000Index: moap/util/mail.py =================================================================== --- moap/util/mail.py (revision 210) +++ moap/util/mail.py (working copy) @@ -8,6 +8,7 @@ import MimeWriter import base64 import StringIO +import urllib """ Code to send out mails. @@ -17,20 +18,25 @@ """ I create e-mail messages with possible attachments. """ - def __init__(self, subject, to, fromm): + def __init__(self, subject, to): """ @type to: string or list of strings @param to: who to send mail to - @type fromm: string - @param fromm: who to send mail as """ self.subject = subject self.to = to if isinstance(to, str): self.to = [to, ] - self.fromm = fromm + self.fromm = None self.attachments = [] # list of dicts + def setFromm(self, fromm): + """ + @type fromm: string + @param fromm: who to send mail as + """ + self.fromm = fromm + def setContent(self, content): self.content = content @@ -78,3 +84,27 @@ smtp.close() return result + + def mailto(self): + """ + Generate a mailto: link that can be opened by any mailto: + handling program. + + This method unfortunately does not handle attachments, since + the mailto: specification doesn't allow them. + """ + ret = 'mailto:' + ','.join(self.to) + args = [] + if self.subject: + args.append(('subject', self.subject)) + if self.content: + args.append(('body', self.content)) + + if args: + l = [] + for key, value in args: + l.append("%s=%s" % (key, urllib.quote(value))) + + ret += "?" + "&".join(l) + + return ret moap-0.2.7/moap/test/prepare/mail.py0000664000076400007640000000420610615152650014257 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # code to send out a release announcement of the latest or specified version # adapted from http://www.redcor.ch:8180/redcor/redcor/web/intranet_zope_plone/tutorial/faq/SendingMailWithAttachmentsViaPython import smtplib import MimeWriter import base64 import StringIO """ Code to send out mails. """ class Message: """ I create e-mail messages with possible attachments. """ def __init__(self, subject, to, fromm): """ @type to: string or list of strings @param to: who to send mail to @type fromm: string @param fromm: who to send mail as """ self.subject = subject self.to = to if isinstance(to, str): self.to = [to, ] self.fromm = fromm self.attachments = [] # list of dicts def setContent(self, content): self.content = content def addAttachment(self, name, mime, content): d = { 'name': name, 'mime': mime, 'content': content, } self.attachments.append(d) def get(self): """ Get the message. """ message = StringIO.StringIO() writer = MimeWriter.MimeWriter(message) writer.addheader('MIME-Version', '1.0') writer.addheader('Subject', self.subject) writer.addheader('To', ", ".join(self.to)) writer.startmultipartbody('mixed') # start off with a text/plain part part = writer.nextpart() body = part.startbody('text/plain') body.write(self.content) # add attachments for a in self.attachments: part = writer.nextpart() part.addheader('Content-Transfer-Encoding', 'base64') body = part.startbody('%(mime)s; name=%(name)s' % a) body.write(base64.encodestring(a['content'])) # finish off writer.lastpart() return message.getvalue() def send(self, server="localhost"): smtp = smtplib.SMTP(server) result = smtp.sendmail(self.fromm, self.to, self.get()) smtp.close() return result moap-0.2.7/moap/test/Makefile.am0000664000076400007640000000401611220365406013356 00000000000000CLEANFILES = *.py{c,o} EXTRA_DIST = \ __init__.py \ common.py \ test_bug_bugzilla.py \ test_commands_cl.py \ test_commands_doap.py \ test_commands_tracadmin.py \ test_doap_doap.py \ test_util_ctags.py \ test_util_distro.py \ test_util_mail.py \ test_util_usermap.py \ test_util_util.py \ test_vcs_bzr.py \ test_vcs_cvs.py \ test_vcs_darcs.py \ test_vcs_git.py \ test_vcs_svn.py \ test_vcs_git_svn.py \ test_bash_completion.sh \ ChangeLog \ ChangeLog/ChangeLog.moap \ ChangeLog/ChangeLog.moap.2 \ ChangeLog/ChangeLog.gstreamer \ ChangeLog/ChangeLog.gst-plugins-base \ ChangeLog/ChangeLog.gst-plugins-base.270 \ ChangeLog/ChangeLog.gst-plugins-base.271 \ ChangeLog/ChangeLog.gst-plugins-good \ ChangeLog/ChangeLog.notedited \ doap/mach.doap \ ical/mach.ics \ rss/mach.rss.cheetah \ rss/mach.rss.genshi \ diff/svn_add_one_line.diff \ diff/svn_add_first_last_line.diff \ diff/svn_multiple.diff \ prepare/mail.py \ prepare/mail.patch \ trac/trac/conf \ trac/trac/conf/trac.ini.sample \ trac/trac/conf/trac.ini \ trac/trac/VERSION \ trac/trac/db \ trac/trac/plugins \ trac/trac/attachments \ trac/trac/wiki-macros \ trac/trac/log \ trac/trac/README \ trac/trac/templates \ trac/trac/templates/site_footer.cs \ trac/trac/templates/site_newticket.cs \ trac/trac/templates/site_header.cs \ trac/trac/templates/README \ trac/trac/templates/site_css.cs \ trac/trac/htdocs \ trac/db.dump # re-generation of test files when needed regenerate: rss/mach.rss.cheetah.regenerate rss/mach.rss.genshi.regenerate ical/mach.ics.regenerate bugzilla/gst-plugins-base-0.10.2.csv.regenerate %.regenerate: rm $* make $* rss/mach.rss.cheetah: moap doap -f doap/mach.doap rss -t cheetah > $@ rss/mach.rss.genshi: moap doap -f doap/mach.doap rss -t genshi > $@ ical/mach.ics: moap doap -f doap/mach.doap ical > $@ bugzilla/gst-plugins-base-0.10.2.csv: wget -O $@ "http://bugzilla.gnome.org/buglist.cgi?product=GStreamer&component=gst-plugins-base&target_milestone=0.10.2&resolution=FIXED&ctype=csv&&query_format=advanced" moap-0.2.7/moap/test/test_vcs_darcs.py0000664000076400007640000000674211220415144014705 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_vcs_darcs -*- # vi:si:et:sw=4:sts=4:ts=4 import os import commands import tempfile from moap.vcs import darcs from moap.test import common class DarcsTestCase(common.TestCase): if os.system('darcs --version > /dev/null 2>&1') != 0: skip = "No 'darcs' binary, skipping test." def setUp(self): self.repository = tempfile.mkdtemp(prefix="moap.test.darcs.repo.") os.system('darcs initialize --repodir=%s' % self.repository) self.checkout = tempfile.mkdtemp(prefix="moap.test.darcs.checkout.") os.rmdir(self.checkout) cmd = 'darcs get %s %s' % (self.repository, self.checkout) (status, output) = commands.getstatusoutput(cmd) self.failIf(status, "Non-null status %r" % status) # create _darcs/prefs/author a = os.path.join(self.checkout, '_darcs', 'prefs', 'author') h = open(a, 'w') h.write('e@mail.org') h.close() def tearDown(self): os.system('rm -rf %s' % self.checkout) os.system('rm -rf %s' % self.repository) class TestDetect(DarcsTestCase): def testDetectRepository(self): self.failIf(darcs.detect(self.repository)) def testDetectCheckout(self): # should succeed self.failUnless(darcs.detect(self.checkout), "darcs checkout not detected") def testHalfCheckout(self): # should fail checkout = tempfile.mkdtemp(prefix="moap.test.") os.mkdir(os.path.join(checkout, '_darcs')) self.failIf(darcs.detect(checkout)) os.system('rm -rf %s' % checkout) class TestTree(DarcsTestCase): def testDarcs(self): v = darcs.VCSClass(self.checkout) self.failUnless(v) paths = ['test/test1.py', 'test/test2.py', 'test/test3/test4.py', 'test5.py', 'test6/', 'test/test7/'] tree = v.createTree(paths) keys = tree.keys() keys.sort() self.assertEquals(keys, ['', 'test', 'test/test3']) self.failUnless('test1.py' in tree['test']) self.failUnless('test2.py' in tree['test']) self.failUnless('test7' in tree['test']) self.failUnless('test4.py' in tree['test/test3']) self.failUnless('test5.py' in tree[''], tree['']) self.failUnless('test6' in tree[''], tree['']) class TestIgnore(DarcsTestCase): def testGetUnignored(self): v = darcs.VCSClass(self.checkout) self.failUnless(v) self.assertEquals(v.getUnknown(v.path), []) path = os.path.join(self.checkout, 'test') handle = open(path, 'w') handle.write('test') handle.close() self.assertEquals(v.getUnknown(v.path), ['test']) v.ignore(['test', ]) self.assertEquals(v.getUnknown(v.path), []) class TestDiff(DarcsTestCase): def testDiff(self): v = darcs.VCSClass(self.checkout) self.failUnless(v) self.assertEquals(v.diff(self.checkout), "") def testGetChanges(self): v = darcs.VCSClass(self.checkout) self.failUnless(v) file = os.path.join(os.path.dirname(__file__), 'diff', 'svn_add_one_line.diff') d = open(file).read() v.getChanges(None, d) def testGetChangesMultiple(self): v = darcs.VCSClass(self.checkout) self.failUnless(v) file = os.path.join(os.path.dirname(__file__), 'diff', 'svn_multiple.diff') d = open(file).read() v.getChanges(None, d) moap-0.2.7/moap/test/test_vcs_git.py0000664000076400007640000000676111220415143014374 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_vcs_git -*- # vi:si:et:sw=4:sts=4:ts=4 import os import commands import tempfile from moap.vcs import git from moap.test import common class GitTestCase(common.TestCase): if os.system('git --version > /dev/null 2>&1') != 0: skip = "No 'git' binary, skipping test." def setUp(self): self.repository = tempfile.mkdtemp(prefix="moap.test.repo.") self.oldPath = os.getcwd() os.chdir(self.repository) os.system('git init > /dev/null') # we actually need to have something in there before we can clone h = open('README', 'w') h.write('README') h.close() os.system('git add README > /dev/null') os.system('git commit -a -m "readme" > /dev/null') os.chdir(self.oldPath) self.checkout = tempfile.mkdtemp(prefix="moap.test.checkout.") os.rmdir(self.checkout) cmd = 'git clone %s %s > /dev/null' % (self.repository, self.checkout) (status, output) = commands.getstatusoutput(cmd) print output self.failIf(status, "Non-null status %r" % status) def tearDown(self): os.chdir(self.oldPath) os.system('rm -rf %s' % self.checkout) os.system('rm -rf %s' % self.repository) class TestDetect(GitTestCase): def testDetectRepository(self): # the repository is equal to a checkout self.failUnless(git.detect(self.repository)) def testDetectCheckout(self): # should succeed self.failUnless(git.detect(self.checkout)) def testHalfCheckout(self): # should fail checkout = tempfile.mkdtemp(prefix="moap.test.") os.mkdir(os.path.join(checkout, '.git')) self.failIf(git.detect(checkout)) os.system('rm -rf %s' % checkout) class TestCommit(GitTestCase): def testQuotedCommit(self): filename = os.path.join(self.checkout, 'one_line_file.txt') open(filename, 'w').write('This is one line file.\n') os.chdir(self.checkout) cmd = 'git add one_line_file.txt' (status, output) = commands.getstatusoutput(cmd) self.failIf(status, "Non-null status %r, output %r" % (status, output)) v = git.VCSClass(self.checkout) self.failUnless(v) v.commit(['one_line_file.txt', ], "I contain quotes like ' and \"") class TestTree(GitTestCase): def testGit(self): v = git.VCSClass(self.checkout) self.failUnless(v) paths = ['test/test1.py', 'test/test2.py', 'test/test3/test4.py', 'test5.py', 'test6/', 'test/test7/'] tree = v.createTree(paths) keys = tree.keys() keys.sort() self.assertEquals(keys, ['', 'test', 'test/test3']) self.failUnless('test1.py' in tree['test']) self.failUnless('test2.py' in tree['test']) self.failUnless('test7' in tree['test']) self.failUnless('test4.py' in tree['test/test3']) self.failUnless('test5.py' in tree[''], tree['']) self.failUnless('test6' in tree[''], tree['']) class TestIgnore(GitTestCase): def testGetUnignored(self): v = git.VCSClass(self.checkout) self.failUnless(v) self.assertEquals(v.getUnknown(v.path), []) path = os.path.join(self.checkout, 'test') handle = open(path, 'w') handle.write('test') handle.close() self.assertEquals(v.getUnknown(v.path), ['test']) v.ignore(['test', ]) self.assertEquals(v.getUnknown(v.path), []) moap-0.2.7/moap/test/diff/0000777000076400007640000000000011220504670012311 500000000000000moap-0.2.7/moap/test/diff/svn_add_one_line.diff0000664000076400007640000000052610577600707016366 00000000000000Index: moap/vcs/svn.py =================================================================== --- moap/vcs/svn.py (revision 125) +++ moap/vcs/svn.py (working copy) @@ -102,6 +102,7 @@ def diff(self, path): cmd = "svn diff %s" % path output = commands.getoutput(cmd) + return output def update(self, path): moap-0.2.7/moap/test/diff/svn_add_first_last_line.diff0000664000076400007640000000052010626374417017752 00000000000000Index: moap/vcs/svn.py =================================================================== --- moap/vcs/svn.py (revision 231) +++ moap/vcs/svn.py (working copy) @@ -1,3 +1,4 @@ + # -*- Mode: Python; test-case-name: moap.test.test_vcs_svn -*- # vi:si:et:sw=4:sts=4:ts=4 @@ -114,3 +115,4 @@ return output VCSClass = SVN + moap-0.2.7/moap/test/diff/svn_multiple.diff0000664000076400007640000000602310577600707015617 00000000000000Index: moap/test/test_vcs_svn.py =================================================================== --- moap/test/test_vcs_svn.py (revision 125) +++ moap/test/test_vcs_svn.py (working copy) @@ -80,3 +80,14 @@ self.failUnless(v) self.assertEquals(v.diff(self.checkout), "") + + def testGetChanges(self): + v = svn.VCSClass(self.checkout) + self.failUnless(v) + + file = os.path.join(os.path.dirname(__file__), 'diff', + 'add_one_line.diff') + d = open(file).read() + print d + v.getChanges(None, d) + Index: moap/vcs/vcs.py =================================================================== --- moap/vcs/vcs.py (revision 125) +++ moap/vcs/vcs.py (working copy) @@ -5,6 +5,7 @@ Version Control System functionality. """ +import re import os import sys @@ -111,6 +112,48 @@ """ raise NotImplementedError + def getChanges(self, path, diff=None): + """ + Get a list of changes for the given path and subpaths. + + @type diff: str + @param diff: the diff to use instead of a local vcs diff + (only useful for testing) + + @returns: dict of path -> list of line ranges + """ + if not diff: + diff = self.diff(path) + changes = {} + fileMatcher = re.compile('^Index: (\S+)$') + changeMatcher = re.compile( + '^\@\@\s+(-)(\d+),(\d+)\s+(\+)(\d+),(\d+)\s+\@\@$') + lines = diff.split("\n") + for i in range(len(lines)): + fm = fileMatcher.search(lines[i]) + if fm: + # found a file being diffed, now get changes + path = fm.expand('\\1') + changes[path] = [] + i += 1 + while not fileMatcher.search(lines[i]): + m = changeMatcher.search(lines[i]) + if m: + oldLine = m.expand('\\2') + oldCount = m.expand('\\3') + newLine = m.expand('\\5') + newCount = m.expand('\\6') + changes[path].append( + (oldLine, oldCount, newLine, newCount)) + i += 1 + print m + print "THOMAS", path + print changes + + + blocks = diff.split("Index: ") + #for line in diff.split("\n"): + def update(self, path): """ Update the given path to the latest version. Index: moap/vcs/svn.py =================================================================== --- moap/vcs/svn.py (revision 125) +++ moap/vcs/svn.py (working copy) @@ -94,6 +94,7 @@ temp, " ".join(paths)) status = os.system(cmd) os.unlink(temp) + if status != 0: return False @@ -102,6 +103,7 @@ def diff(self, path): cmd = "svn diff %s" % path output = commands.getoutput(cmd) + return output def update(self, path): moap-0.2.7/moap/test/test_util_usermap.py0000664000076400007640000000152311220415152015436 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_doap_doap -*- # vi:si:et:sw=4:sts=4:ts=4 import os import tempfile from moap.util import usermap from moap.test import common class TestUserMap(common.TestCase): def setUp(self): self.map = usermap.UserMap() def testUserMapException(self): self.assertRaises(usermap.UserMapException, self.map.parse, """thomaslisa mama:papa""") def testUserMapFromFile(self): file = tempfile.NamedTemporaryFile(suffix='moap') file.write("""thomas:lisa # this is a comment mama:papa """) file.flush() # otherwise nothing is written yet self.map.parseFromPath(file.name) self.assertEquals(self.map[0], ('thomas', 'lisa')) self.assertEquals(self.map[1], ('mama', 'papa')) self.assertEquals(len(self.map), 2) moap-0.2.7/moap/test/test_doap_doap.py0000664000076400007640000000210611220415170014651 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_doap_doap -*- # vi:si:et:sw=4:sts=4:ts=4 import os from moap.doap import doap from moap.test import common class TestDoap(common.TestCase): def setUp(self): file = os.path.join(os.path.dirname(__file__), 'doap', 'mach.doap') self.doap = doap.Doap() self.doap.addFile(file) def testGetProject(self): p = self.doap.getProject() self.failUnless(p) self.assertEquals(p.name, 'Mach') self.assertEquals(p.shortname, 'mach') self.failUnless(p.description, "No description") self.assertEquals(len(p.release), 11) v = p.release[0].version self.assertEquals(v.revision, '0.9.0') r = p.getRelease('0.9.0') self.failUnless(r) self.assertEquals(r.version.revision, '0.9.0') # 4 file releases in 0.9.0 fr = r.version.file_release self.assertEquals(len(fr), 4) self.failUnless(fr[0].startswith('http')) try: import RDF except ImportError: TestDoap.skip = "No rdf module, skipping" moap-0.2.7/moap/test/test_vcs_svn.py0000664000076400007640000002262511220423704014416 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_vcs_svn -*- # vi:si:et:sw=4:sts=4:ts=4 import common import os import commands import tempfile from moap.util import log from moap.vcs import svn class SVNTestCase(common.SVNTestCase): if os.system('svn --version > /dev/null 2>&1') != 0: skip = "No 'svn' binary, skipping test." def setUp(self): self.repository = self.createRepository() self.livedir = self.createLive() cmd = 'svn checkout file://%s %s' % (self.repository, self.livedir) (status, output) = commands.getstatusoutput(cmd) self.failIf(status) def tearDown(self): os.system('rm -rf %s' % self.livedir) os.system('rm -rf %s' % self.repository) class TestDetect(SVNTestCase): def testDetectRepository(self): # should fail self.failIf(svn.detect(self.repository)) def testDetectCheckout(self): # should succeed self.failUnless(svn.detect(self.livedir)) def testHalfCheckout(self): # should fail checkout = tempfile.mkdtemp(prefix="moap.test.") os.mkdir(os.path.join(checkout, '.svn')) self.failIf(svn.detect(checkout)) os.system('rm -rf %s' % checkout) class TestTree(SVNTestCase): def testSVN(self): v = svn.VCSClass(self.livedir) self.failUnless(v) paths = ['test/test1.py', 'test/test2.py', 'test/test3/test4.py', 'test5.py', 'test6/', 'test/test7/'] tree = v.createTree(paths) keys = tree.keys() keys.sort() self.assertEquals(keys, ['', 'test', 'test/test3']) self.failUnless('test1.py' in tree['test']) self.failUnless('test2.py' in tree['test']) self.failUnless('test7' in tree['test']) self.failUnless('test4.py' in tree['test/test3']) self.failUnless('test5.py' in tree[''], tree['']) self.failUnless('test6' in tree[''], tree['']) class TestIgnore(SVNTestCase): def testGetUnignored(self): v = svn.VCSClass(self.livedir) self.failUnless(v) self.assertEquals(v.getUnknown(v.path), []) path = self.liveWriteFile('test', 'test') self.assertEquals(v.getUnknown(v.path), ['test']) v.ignore([path, ]) self.assertEquals(v.getUnknown(v.path), []) class TestDiff(SVNTestCase): def testNoDiff(self): v = svn.VCSClass(self.livedir) self.failUnless(v) self.assertEquals(v.diff(self.livedir), "") def testNewFileDiff(self): v = svn.VCSClass(self.livedir) self.failUnless(v) # create a file path = self.liveWriteFile('test', "test\n") # add it without committing os.system('svn add %s' % path) # make sure we have the proper number of lines; # Index, =, -, +, location, actual change # there should be no empty line diff = v.diff(self.livedir) lines = diff.split('\n') self.assertEquals(len(lines), 6) self.failIfEquals(diff[-1], '\n') def testGetChanges(self): v = svn.VCSClass(self.livedir) self.failUnless(v) file = os.path.join(os.path.dirname(__file__), 'diff', 'svn_add_one_line.diff') d = open(file).read() c = v.getChanges(None, d) # one line added in moap/vcs/svn.py at 105 self.assertEquals(len(c.keys()), 1) self.failUnless(c.has_key('moap/vcs/svn.py')) self.assertEquals(c['moap/vcs/svn.py'], [(105, 0, 105, 1)]) def testGetChangesMultiple(self): v = svn.VCSClass(self.livedir) self.failUnless(v) file = os.path.join(os.path.dirname(__file__), 'diff', 'svn_multiple.diff') d = open(file).read() c = v.getChanges(None, d) # three files changed self.assertEquals(len(c.keys()), 3) self.failUnless(c.has_key('moap/vcs/vcs.py')) self.assertEquals(c['moap/vcs/vcs.py'], [ (8, 0, 8, 1), (114, 0, 115, 42), ]) def testGetChangesWithSymlink(self): v = svn.VCSClass(self.livedir) self.failUnless(v) file = os.path.join(os.path.dirname(__file__), 'diff', 'svn_symlink.diff') d = v.scrubPropertyChanges(open(file).read()) c = v.getChanges(None, d) # two files changed self.assertEquals(len(c.keys()), 5) self.failUnless(c.has_key('buildbot1/Makefile')) self.failUnless(c.has_key('buildbot1/words.cfg')) self.assertEquals(c['buildbot1/Makefile'], [ (9, 2, 9, 6), ]) def testAddFirstLast(self): v = svn.VCSClass(self.livedir) self.failUnless(v) file = os.path.join(os.path.dirname(__file__), 'diff', 'svn_add_first_last_line.diff') d = open(file).read() c = v.getChanges(None, d) # one file changed self.assertEquals(len(c.keys()), 1) self.failUnless(c.has_key('moap/vcs/svn.py')) self.assertEquals(c['moap/vcs/svn.py'], [ (1, 0, 1, 1), (117, 0, 118, 1), ]) def testGetChangesWithProperties(self): # property changes used to break the diff; see #252 # only breaks when there's a second file after a first file's # property changes v = svn.VCSClass(self.livedir) self.failUnless(v) # create a file path = self.liveWriteFile('test', "test\n") path2 = self.liveWriteFile('test2', "test\n") # add it os.system('svn add %s' % path) os.system('svn add %s' % path2) os.system('svn commit -m "test" %s' % self.livedir) # change the files self.liveWriteFile('test', "test change\n") self.liveWriteFile('test2', "test 2 change\n") # change property on it os.system('svn ps property value %s' % path) # now get changes c = v.getChanges(self.livedir) self.assertEquals(c[path], [ (1, 1, 1, 1), ]) self.assertEquals(c[path2], [ (1, 1, 1, 1), ]) class TestChangeProperties(SVNTestCase): def testGetPropertyChanges(self): v = svn.VCSClass(self.livedir) self.failUnless(v) # create a file path = self.liveWriteFile('test', "test\n") path2 = self.liveWriteFile('test2', "test\n") # add it os.system('svn add %s' % path) os.system('svn add %s' % path2) os.system('svn commit -m "test" %s' % self.livedir) # change property on it os.system('svn ps svn:property value %s' % path) os.system('svn ps svn:property value %s' % path2) os.system('svn ps svn:property2 value %s' % path2) # now get changes c = v.getPropertyChanges(self.livedir) self.assertEquals(c, { path: ['svn:property', ], path2: ['svn:property', 'svn:property2'], }) class TestAddDelete(SVNTestCase): def testGetAddedDeleted(self): v = svn.VCSClass(self.livedir) self.failUnless(v) # create a file path = self.liveWriteFile('test', "test\n") # add it without committing os.system('svn add %s' % path) paths = v.getAdded(self.livedir) self.assertEquals(paths, ['test', ]) # now commit os.system('svn commit -m "test" %s' % self.livedir) paths = v.getAdded(self.livedir) self.failIf(paths) # now delete os.system('svn delete %s' % path) paths = v.getDeleted(self.livedir) self.assertEquals(paths, ['test', ]) paths = v.getAdded(self.livedir) self.failIf(paths) # now commit os.system('svn commit -m "test" %s' % self.livedir) paths = v.getAdded(self.livedir) self.failIf(paths) paths = v.getDeleted(self.livedir) self.failIf(paths) class TestBackupRestore(SVNTestCase): def setUp(self): SVNTestCase.setUp(self) self.vcs = svn.VCSClass(self.livedir) self.failUnless(self.vcs) def assertBackupRestore(self): # do a backup and restore and check fd, archive = tempfile.mkstemp(suffix='.tar.gz', prefix="moap.test.") os.close(fd) # backup does a test restore log.debug('test', 'backing up archive %s', archive) self.vcs.backup(archive) os.unlink(archive) def testBackupRestore(self): v = svn.VCSClass(self.livedir) self.failUnless(v) # create a file path = self.liveWriteFile('test', "test\n") self.assertBackupRestore() # add it without committing os.system('svn add %s' % path) # FIXME: doesn't work yet; the fact that it was added is not recorded # in the archive # self.assertBackupRestore() # now commit os.system('svn commit -m "test" %s' % self.livedir) self.assertBackupRestore() # now delete os.system('svn delete %s' % path) # FIXME: doesn't work yet; the fact that it was deleted is not recorded # in the archive # self.assertBackupRestore() # now commit os.system('svn commit -m "test" %s' % self.livedir) self.assertBackupRestore() # FIXME: do more return paths = v.getAdded(self.livedir) self.failIf(paths) paths = v.getAdded(self.livedir) self.failIf(paths) paths = v.getDeleted(self.livedir) self.failIf(paths) moap-0.2.7/moap/test/test_bug_bugzilla.py0000664000076400007640000000226411220415212015373 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_bug_bugzilla -*- # vi:si:et:sw=4:sts=4:ts=4 import os from moap.bug import bugzilla from moap.test import common class TestGstCsv(common.TestCase): def setUp(self): file = os.path.join(os.path.dirname(__file__), 'bugzilla', 'gst-plugins-base-0.10.2.csv') self.handle = open(file) self.bugzilla = bugzilla.Bugzilla(None) def testQuery(self): l = self.bugzilla.query(None, handle=self.handle) for b in l: if b.id == '324696': return self.fail('Did not find bug 324696') class TestRDFGst:#(common.TestCase): try: import RDF except ImportError: skip = "No rdf module, skipping" def setUp(self): file = os.path.join(os.path.dirname(__file__), 'bugzilla', 'gst-plugins-base-0.10.rdf') #file = os.path.join(os.path.dirname(__file__), 'doap', # 'mach.doap') self.rdf = bugzilla.BugzillaRDF() self.rdf.addLocation('file:' + file) def testById(self): self.rdf.getById(324696) try: import RDF except ImportError: TestGstCsv.skip = "No rdf module, skipping" moap-0.2.7/moap/test/test_util_util.py0000664000076400007640000000347211220414465014752 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_util_util -*- # vi:si:et:sw=4:sts=4:ts=4 import common import os from moap.util import util class TestUtil(common.TestCase): def testGetEditor(self): env = {} self.failIf(util.getEditor(env)) env["EDITOR"] = "vim" self.assertEquals(util.getEditor(env), "vim") env["VISUAL"] = "nano" self.assertEquals(util.getEditor(env), "nano") def testNamedModule(self): name = "moap.test.test_util_util" m = util.namedModule(name) self.failUnless(m) self.assertEquals(m.__name__, name) name = "i.do.not.exist" self.assertRaises(ImportError, util.namedModule, name) def testGetPackageModules(self): list = util.getPackageModules("moap.test") self.failUnless('test_util_util' in list) list = util.getPackageModules("moap.test", ignore=['test_util_util']) self.failIf('test_util_util' in list) def testEditTemp(self): stdout = common.FakeStdOut() # editor that does not change os.environ['VISUAL'] = 'true' ret = util.editTemp(stdout=stdout) self.assertEquals(ret, None) ret = util.editTemp(instructions=['test instructions', ], stdout=stdout) self.assertEquals(ret, None) ret = util.editTemp(contents=['test contents', ], stdout=stdout) self.assertEquals(ret, None) # editor that does change; sleep is needed for the mtime os.environ['VISUAL'] = "sleep 1 && perl -i -p -e 's@test@tested@g'" ret = util.editTemp() self.assertEquals(ret, []) ret = util.editTemp(instructions=['test instructions', ]) self.assertEquals(ret, []) ret = util.editTemp(contents=['test contents', ]) self.assertEquals(ret, ['tested contents', ]) moap-0.2.7/moap/test/__init__.py0000644000076400007640000000000010540745421013421 00000000000000moap-0.2.7/moap/test/test_commands_doap.py0000664000076400007640000000633611220415203015535 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_commands_doap -*- # vi:si:et:sw=4:sts=4:ts=4 import os import StringIO from twisted.trial import unittest from moap.util import log from moap.command import doap from moap.test import common class TestDoapMach(common.TestCase): def setUp(self): self.doap = os.path.join(os.path.dirname(__file__), 'doap', 'mach.doap') self.ical = os.path.join(os.path.dirname(__file__), 'ical', 'mach.ics') self.grss = os.path.join(os.path.dirname(__file__), 'rss', 'mach.rss.genshi') self.crss = os.path.join(os.path.dirname(__file__), 'rss', 'mach.rss.cheetah') self.stdout = StringIO.StringIO() self.command = doap.Doap(stdout=self.stdout) def testIcal(self): ret = self.command.parse(['-f', self.doap, 'ical']) ref = open(self.ical).read() self.assertEquals(self.stdout.getvalue(), ref) def testRssGenshi(self): try: import genshi except ImportError: raise unittest.SkipTest("No genshi module, skipping.") ret = self.command.parse(['-f', self.doap, 'rss']) ref = open(self.grss).read() self.assertEquals(self.stdout.getvalue(), ref) def testRssCheetah(self): try: import Cheetah except ImportError: raise unittest.SkipTest("No Cheetah module, skipping.") ret = self.command.parse(['-f', self.doap, 'rss', '-t', 'cheetah']) ref = open(self.crss).read() self.assertEquals(self.stdout.getvalue(), ref) def testShow(self): ret = self.command.parse(['-f', self.doap, 'show']) ref = u"""DOAP file: %s project: Mach short description: mach makes chroots created: 2002-06-06 homepage: http://thomas.apestaart.org/projects/mach/ bug database: https://apestaart.org/thomas/trac/newticket download page: http://thomas.apestaart.org/projects/mach/ Latest release: version 0.9.0 'Cambria' on branch 2. """ % self.doap self.assertEquals(self.stdout.getvalue(), ref) class TestDoapUnspecified(common.TestCase): # we don't specify the doap file, let doap find it on its own def setUp(self): self._cwd = os.getcwd() doapdir = os.path.join(os.path.dirname(__file__), 'doap') os.chdir(doapdir) self.stdout = StringIO.StringIO() self.command = doap.Doap(stdout=self.stdout) def testShow(self): doap = os.path.join(os.path.dirname(__file__), 'doap', 'mach.doap') ret = self.command.parse(['show']) ref = u"""DOAP file: %s project: Mach short description: mach makes chroots created: 2002-06-06 homepage: http://thomas.apestaart.org/projects/mach/ bug database: https://apestaart.org/thomas/trac/newticket download page: http://thomas.apestaart.org/projects/mach/ Latest release: version 0.9.0 'Cambria' on branch 2. """ % doap self.assertEquals(self.stdout.getvalue(), ref) def tearDown(self): os.chdir(self._cwd) try: import RDF except ImportError: TestDoapMach.skip = "No rdf module, skipping." TestDoapUnspecified.skip = "No rdf module, skipping." moap-0.2.7/moap/test/test_vcs_git_svn.py0000664000076400007640000000646611220253430015263 00000000000000# -*- Mode: Python; test-case-name: moap.test.test_vcs_git_svn -*- # vi:si:et:sw=4:sts=4:ts=4 import common import test_vcs_svn import test_vcs_git import os import commands import tempfile from moap.vcs import svn, git, git_svn class GitSvnTestCase(test_vcs_svn.SVNTestCase): # git svn --version just errors about not having a git repo if not os.path.isfile('/usr/bin/git-svn') \ and not os.path.isfile('/usr/lib/git-core/git-svn') \ and not os.path.isfile('/usr/libexec/git-core/git-svn'): skip = "No 'git-svn' binary, skipping test." def setUp(self): self.repository = self.createRepository() self.livedir = self.createLive() cmd = 'git svn init file://%s %s' % (self.repository, self.livedir) (status, output) = commands.getstatusoutput(cmd) self.failIf(status) oldPath = os.getcwd() os.chdir(self.livedir) self.liveWriteFile("lets-create-a-head-to-make-git-happy", "I lost my HEAD") (status, output) = commands.getstatusoutput( "git add lets-create-a-head-to-make-git-happy") self.failIf(status) (status, output) = commands.getstatusoutput( "git commit -m first-commit") self.failIf(status) os.chdir(oldPath) def tearDown(self): test_vcs_svn.SVNTestCase.tearDown(self) class TestDetect(GitSvnTestCase): def testDetectRepository(self): self.failIf(svn.detect(self.repository)) self.failIf(git.detect(self.repository)) self.failIf(git_svn.detect(self.repository)) def testDetectCheckout(self): self.failIf(git.detect(self.livedir)) self.failUnless(git_svn.detect(self.livedir)) def testHalfCheckout(self): # should fail checkout = tempfile.mkdtemp(prefix="moap.test.") os.mkdir(os.path.join(checkout, '.git')) self.failIf(git_svn.detect(checkout)) os.system('rm -rf %s' % checkout) class TestTree(GitSvnTestCase): def testGitSvn(self): v = git_svn.VCSClass(self.livedir) self.failUnless(v) paths = ['test/test1.py', 'test/test2.py', 'test/test3/test4.py', 'test5.py', 'test6/', 'test/test7/'] tree = v.createTree(paths) keys = tree.keys() keys.sort() self.assertEquals(keys, ['', 'test', 'test/test3']) self.failUnless('test1.py' in tree['test']) self.failUnless('test2.py' in tree['test']) self.failUnless('test7' in tree['test']) self.failUnless('test4.py' in tree['test/test3']) self.failUnless('test5.py' in tree[''], tree['']) self.failUnless('test6' in tree[''], tree['']) class TestIgnore(GitSvnTestCase): def testGetUnignored(self): v = git_svn.VCSClass(self.livedir) self.failUnless(v) self.assertEquals(v.getUnknown(v.path), []) path = os.path.join(self.livedir, 'test') handle = open(path, 'w') handle.write('test') handle.close() self.assertEquals(v.getUnknown(v.path), ['test']) v.ignore(['test', ]) self.assertEquals(v.getUnknown(v.path), []) class TestDiff(GitSvnTestCase): def testDiff(self): v = git_svn.VCSClass(self.livedir) self.failUnless(v) self.assertEquals(v.diff(self.livedir), "") moap-0.2.7/TODO0000664000076400007640000000242111220443606010074 00000000000000- implement a feature that, given a VCS checkout: - backs up every file that is not in version control - makes a diff against version control - finds the original checkout command - creates an archive of these things - from this you should be able to restore with one command the state - this allows something like dirvish to only back up what is needed from a VCS tree - submit .jar to freshmeat - query bug database (bugzilla/trac) for list of bugs milestoned/fixed - figure out versions of your project shipped by distributions - decide if bug id's should always be int or not - fix output of moap doap bug query --help - moap cl prepare takes an optional ChangeLog file as an argument; should also work if that file does not exist - on ubuntu, need to run bash with --norc in the moap-uninstalled script but what about the ls colors ? - moap ignore should take a list of paths too - add unit test for cvs diff, cvs diff (abspath) does not work - get patches straight out of bugzilla/trac/... and apply ? - convert current vcs diff to a quilt patch (possibly selecting files) - use popen2 module to create a standard class for executing shell commands then capturing stdout/stderr and feeding it back to the Command's stdout/stderr so we can get clean test run output moap-0.2.7/NEWS0000664000076400007640000001237611220504014010104 00000000000000This is MOAP 0.2.7, "MMM...". Coverage in 0.2.7: 1424 / 1899 (74 %), 109 python tests, 2 bash tests Features added since 0.2.6: - Added moap vcs backup, a command to backup a checkout to a tarball that can be used later to reconstruct the checkout. Implemented for svn. - Fixes for git-svn, git, svn and darcs. - Fixes for Python 2.3 and Python 2.6 Bugs fixed since 0.2.6: - 263: broken changelog unit test - 267: a man page - 270: cl find completely busted - 275: cl prepare --ctags failure with exuberant ctags 5.7 - 257: ImportError: No module named moap.util - 258: git-svn support - 259: bzr diff patch - 266: svn:ignore property not well parsed - 273: DEP: RDF, Fedora release 7 (Moonshine) - 277: "changelog prepare" doesn't list changed functions in C++ files. - 281: changelog prepare -c crashes with "not a ctags line" - 282: make install fails - 284: not full change detected on svn move file - 286: [svn] propedit on externals is not recognized as a change - 239: warn if ChangeLog has not been saved - 260: Add changelog grep command - 261: Option to make 'changelog diff' include differences in ChangeLog file - 262: changelog find: fix for multiple search terms - 264: Make changelog find case insensitive by default - 265: git diff should show staged changes - 271: trailing spaces in date/name/address line for entry break parsing Coverage in 0.2.6: 1288 / 1742 (73 %), 103 python tests, 2 bash tests Features added since 0.2.5: - Added support for git-svn. - Fix brz diff. - Added moap changelog find to search through a ChangeLog. - Added man page. - Added moap tracadmin to administrate trac installations. - Added changed properties/added/deleted files when preparing ChangeLog entries. - Added checking of unchanged ChangeLog entry template. Bugs fixed since 0.2.5: - 263: broken changelog unit test - 267: a man page - 270: cl find completely busted - 275: cl prepare --ctags failure with exuberant ctags 5.7 - 257: ImportError: No module named moap.util - 258: git-svn support - 259: bzr diff patch - 266: svn:ignore property not well parsed - 273: DEP: RDF, Fedora release 7 (Moonshine) - 277: "changelog prepare" doesn't list changed functions in C++ files. - 281: changelog prepare -c crashes with "not a ctags line" - 282: make install fails - 284: not full change detected on svn move file - 286: [svn] propedit on externals is not recognized as a change - 239: warn if ChangeLog has not been saved - 260: Add changelog grep command - 261: Option to make 'changelog diff' include differences in ChangeLog file - 262: changelog find: fix for multiple search terms - 264: Make changelog find case insensitive by default - 265: git diff should show staged changes - 271: trailing spaces in date/name/address line for entry break parsing Coverage in 0.2.5: 1039/1393 (74 %), 75 python tests, 2 bash tests Features added since 0.2.4: - added support for dc:description in .doap files to list the release's features - added bugzilla implementation for moap bug and moap doap bug - added better support for detecting exuberant ctags - added support for filing bugs for missing dependencies/distros - added Bazaar and Git backend for version control system features - added "moap changelog contributors" to get a list of contributors to a release - changed default behaviour for "moap changelog prepare" to not extract tags - added -c, --ctags option to "moap changelog prepare" to extract tags - added "help" command to "moap" and all its subcommands Bugs fixed since 0.2.4: - 240: no help command - 241: build failure on ubuntu fisty - 243: add bzr vcs backend - 248: DEP: Cheetah, Ubuntu 7.04 - 250: Fixes for exuberant ctags checks - 252: moap cl prepare yields a traceback - 254: make fails if moap not in PATH - 255: [patch] --no-ctags option for cl prepare command Coverage in 0.2.4: 862/1177 (73 %), 56 python tests, 2 bash tests Features added since 0.2.3: - moap doap freshmeat -b allows forcing a branch name (e.g. 'Default') - distro checking code to give hints on how to install dependencies - RSS2 feed generation from .doap release entries using Genshi or Cheetah templates - ability to operate on multiple .doap files - make moap changelog prepare also check the CHANGE_LOG_EMAIL_ADDRESS variable - implement searching for your project's home page using Yahoo or Google - parse wiki attribute of a DOAP Project Bugs fixed since 0.2.3: - 235: moap.extern.log is wrong installed Coverage in 0.2.3: 801/1100 (72 %), 49 python tests, 2 bash tests Features added since 0.2.2: - added Darcs support as a VCS implementation - added support for generating iCal data out of .doap release entries - log module is now the external log module from Flumotion Bugs fixed since 0.2.2: - 234: traceback when no ChangeLog exists in directory run when doing moap cl prepare Coverage in 0.2.2: 663/837 (79 %), 50 python tests, 2 bash tests Features added since 0.2.1: - added "moap changelog prepare" to prepare a new ChangeLog entry - added "code" subcommand to test and develop code Bugs fixed since 0.2.1: - 233: moap gets error when doing cl prepare - 232: moap ignore should error out with a decent message if no editor could be found Coverage in 0.2.1: 460/671 (68 %), 22 python tests, 2 bash tests Features added since 0.2.0: - bash completion - trac bug querying Coverage in 0.2.0: 449/629 (71 %), 22 python tests moap-0.2.7/moap.spec0000664000076400007640000000302411220504530011206 00000000000000%define pyver %(%{__python} -c "import sys; print sys.version[:3]") Name: moap Version: 0.2.7 Release: 1%{?dist} Summary: Swiss army knife for project maintainers and developers Source: %{name}-%{version}.tar.bz2 URL: http://thomas.apestaart.org/moap/trac/ License: GPL Group: Applications/Archiving BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %description MOAP is a swiss army knife for project maintainers and developers. It aims to help in keeping you in the flow of maintaining, developing and releasing, automating whatever tasks can be automated. It allows you to parse DOAP files and submit releases, send release mails, create iCal files and RSS feeds, maintain version control ignore lists, check in based on the latest ChangeLog entry, and more. %prep %setup -q %configure --sysconfdir=%{_sysconfdir} %build %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README moap.doap NEWS RELEASE ChangeLog %{_bindir}/moap %{_mandir}/man1/moap.1* %{_libdir}/python*.*/site-packages/moap %{_sysconfdir}/bash_completion.d/moap %changelog * Mon Aug 06 2007 Thomas Vander Stichele - added man page * Sat Feb 03 2007 Thomas Vander Stichele - added bash completion file - use DESTDIR install * Sat Sep 16 2006 Thomas Vander Stichele - initial package moap-0.2.7/Makefile.am0000664000076400007640000000177110656424633011462 00000000000000# version first -- they are parsed LTR and later options depend on automake 1.8 AUTOMAKE_OPTIONS = 1.8 dist-bzip2 no-dist-gzip ACLOCAL_AMFLAGS = -I m4 SUBDIRS = bin etc moap doc m4 misc EXTRA_DIST = HACKING moap.spec moap.doap RELEASE check: pychecker check-python check-bash check-python: trial moap.test check-bash: $(SHELL) $(top_srcdir)/moap/test/test_bash_completion.sh $(top_builddir)/etc/bash_completion.d/moap _trial_temp/coverage: $(top_srcdir)/moap/*.py $(top_srcdir)/moap/*/*.py trial --coverage moap.test coverage: _trial_temp/coverage python misc/show-coverage.py `ls _trial_temp/coverage/moap* | grep -v moap.test | grep -v moap.extern` clean-local: @rm -rf _trial_temp PYCHECKER_WHITELIST = \ moap/*.py \ moap/bug/*.py \ moap/command/*.py \ moap/doap/*.py \ moap/util/*.py \ moap/vcs/*.py PYCHECKER_BLACKLIST = \ moap/bug/bugzilla.py release: dist make $(PACKAGE)-$(VERSION).tar.bz2.md5 # generate md5 sum files %.md5: % md5sum $< > $@ include $(top_srcdir)/m4/pychecker.mk moap-0.2.7/INSTALL0000644000076400007640000002622211150667217010450 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 6. Often, you can also type `make uninstall' to remove the installed files again. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *Note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. moap-0.2.7/COPYING0000664000076400007640000004307611025166224010453 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy 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., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. moap-0.2.7/configure0000755000076400007640000032375511220504525011327 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for moap 0.2.7. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='moap' PACKAGE_TARNAME='moap' PACKAGE_VERSION='0.2.7' PACKAGE_STRING='moap 0.2.7' PACKAGE_BUGREPORT='http://thomas.apestaart.org/moap/trac/newticket' ac_subst_vars='LTLIBOBJS LIBOBJS HAVE_PYCHECKER_FALSE HAVE_PYCHECKER_TRUE PYCHECKER HAVE_EPYDOC_FALSE HAVE_EPYDOC_TRUE EPYDOC PYTHONLIBDIR pkgpyexecdir pyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON ACLOCAL_AMFLAGS MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE PACKAGE_VERSION_RELEASE PACKAGE_VERSION_NANO PACKAGE_VERSION_MICRO PACKAGE_VERSION_MINOR PACKAGE_VERSION_MAJOR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='AUTHORS' ac_user_opts=' enable_option_checking enable_maintainer_mode ' ac_precious_vars='build_alias host_alias target_alias' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures moap 0.2.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/moap] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of moap 0.2.7:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF moap configure 0.2.7 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by moap $as_me 0.2.7, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.10' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='moap' VERSION='0.2.7' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' PACKAGE_VERSION_MAJOR=$(echo 0.2.7 | cut -d'.' -f1) PACKAGE_VERSION_MINOR=$(echo 0.2.7 | cut -d'.' -f2) PACKAGE_VERSION_MICRO=$(echo 0.2.7 | cut -d'.' -f3) { $as_echo "$as_me:$LINENO: checking nano version" >&5 $as_echo_n "checking nano version... " >&6; } NANO=$(echo 0.2.7 | cut -d'.' -f4) if test x"$NANO" = x || test "x$NANO" = "x0" ; then { $as_echo "$as_me:$LINENO: result: 0 (release)" >&5 $as_echo "0 (release)" >&6; } NANO=0 PACKAGE_VERSION_RELEASE=1 : else { $as_echo "$as_me:$LINENO: result: $NANO" >&5 $as_echo "$NANO" >&6; } PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S` : fi PACKAGE_VERSION_NANO=$NANO AUTHORS=$srcdir/AUTHORS { $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ACLOCAL_AMFLAGS="-I m4" { $as_echo "$as_me:$LINENO: Looking for Python version >= 2.3" >&5 $as_echo "$as_me: Looking for Python version >= 2.3" >&6;} prog=" import sys, string minver = '2.3' pyver = string.split(sys.version)[0] # first word is version string # split strings by '.'. just compare textually to allow for versions like # 2.4.1a0 minver = string.split(minver, '.') pyver = string.split(pyver, '.') # we can now do comparisons on the two lists: if pyver >= minver: sys.exit(0) else: sys.exit(1)" python_good=false for python_candidate in python python2.2 python2.1 python2.0 python2 python1.6 python1.5; do unset PYTHON # Extract the first word of "$python_candidate", so it can be a program name with args. set dummy $python_candidate; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PYTHON+set}" = set; then $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi 1> /dev/null 2> /dev/null if test "x$PYTHON" = "x"; then continue; fi if $PYTHON -c "$prog" 1>&5 2>&5; then { $as_echo "$as_me:$LINENO: checking \"$PYTHON\":" >&5 $as_echo_n "checking \"$PYTHON\":... " >&6; } { $as_echo "$as_me:$LINENO: result: okay" >&5 $as_echo "okay" >&6; } python_good=true break; else unset ac_cv_path_PYTHON fi done if test "$python_good" != "true"; then { { $as_echo "$as_me:$LINENO: error: No suitable version of python found" >&5 $as_echo "$as_me: error: No suitable version of python found" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: checking local Python configuration" >&5 $as_echo_n "checking local Python configuration... " >&6; } PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"` PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"` pythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages pkgpythondir=\${pythondir}/$PACKAGE pyexecdir=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages pkgpyexecdir=\${pyexecdir}/$PACKAGE { $as_echo "$as_me:$LINENO: result: looks good" >&5 $as_echo "looks good" >&6; } PYVER=`$PYTHON -c "import sys ; print sys.version[:3]"` PYTHONLIBDIR=\${libdir}/python$PYVER/site-packages { $as_echo "$as_me:$LINENO: Installing python code in $PYTHONLIBDIR" >&5 $as_echo "$as_me: Installing python code in $PYTHONLIBDIR" >&6;} { $as_echo "$as_me:$LINENO: checking for python module RDF" >&5 $as_echo_n "checking for python module RDF... " >&6; } prog=" import sys try: import RDF sys.exit(0) except ImportError: sys.exit(1) except SystemExit: raise except Exception, e: print ' Error while trying to import RDF:' print ' %r: %s' % (e, e) sys.exit(1)" if $PYTHON -c "$prog" 1>&5 2>&5 then { $as_echo "$as_me:$LINENO: result: found" >&5 $as_echo "found" >&6; } HAVE_RDF="yes" else { $as_echo "$as_me:$LINENO: result: not found" >&5 $as_echo "not found" >&6; } HAVE_RDF="no" fi # Extract the first word of "epydoc", so it can be a program name with args. set dummy epydoc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_EPYDOC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$EPYDOC"; then ac_cv_prog_EPYDOC="$EPYDOC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_EPYDOC="yes" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_EPYDOC" && ac_cv_prog_EPYDOC="no" fi fi EPYDOC=$ac_cv_prog_EPYDOC if test -n "$EPYDOC"; then { $as_echo "$as_me:$LINENO: result: $EPYDOC" >&5 $as_echo "$EPYDOC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$EPYDOC" = "xyes"; then HAVE_EPYDOC_TRUE= HAVE_EPYDOC_FALSE='#' else HAVE_EPYDOC_TRUE='#' HAVE_EPYDOC_FALSE= fi # Extract the first word of "pychecker", so it can be a program name with args. set dummy pychecker; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_PYCHECKER+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$PYCHECKER"; then ac_cv_prog_PYCHECKER="$PYCHECKER" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_PYCHECKER="yes" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_PYCHECKER" && ac_cv_prog_PYCHECKER="no" fi fi PYCHECKER=$ac_cv_prog_PYCHECKER if test -n "$PYCHECKER"; then { $as_echo "$as_me:$LINENO: result: $PYCHECKER" >&5 $as_echo "$PYCHECKER" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$PYCHECKER" = "xyes"; then HAVE_PYCHECKER_TRUE= HAVE_PYCHECKER_FALSE='#' else HAVE_PYCHECKER_TRUE='#' HAVE_PYCHECKER_FALSE= fi ac_config_files="$ac_config_files Makefile bin/Makefile etc/Makefile etc/bash_completion.d/Makefile m4/Makefile moap/Makefile moap/bug/Makefile moap/command/Makefile moap/configure/Makefile moap/configure/uninstalled.py moap/configure/installed.py moap/doap/Makefile moap/extern/Makefile moap/publish/Makefile moap/util/Makefile moap/vcs/Makefile moap/test/Makefile doc/Makefile misc/Makefile moap.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_EPYDOC_TRUE}" && test -z "${HAVE_EPYDOC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_EPYDOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_EPYDOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_PYCHECKER_TRUE}" && test -z "${HAVE_PYCHECKER_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PYCHECKER\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_PYCHECKER\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by moap $as_me 0.2.7, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ moap config.status 0.2.7 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; "etc/bash_completion.d/Makefile") CONFIG_FILES="$CONFIG_FILES etc/bash_completion.d/Makefile" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "moap/Makefile") CONFIG_FILES="$CONFIG_FILES moap/Makefile" ;; "moap/bug/Makefile") CONFIG_FILES="$CONFIG_FILES moap/bug/Makefile" ;; "moap/command/Makefile") CONFIG_FILES="$CONFIG_FILES moap/command/Makefile" ;; "moap/configure/Makefile") CONFIG_FILES="$CONFIG_FILES moap/configure/Makefile" ;; "moap/configure/uninstalled.py") CONFIG_FILES="$CONFIG_FILES moap/configure/uninstalled.py" ;; "moap/configure/installed.py") CONFIG_FILES="$CONFIG_FILES moap/configure/installed.py" ;; "moap/doap/Makefile") CONFIG_FILES="$CONFIG_FILES moap/doap/Makefile" ;; "moap/extern/Makefile") CONFIG_FILES="$CONFIG_FILES moap/extern/Makefile" ;; "moap/publish/Makefile") CONFIG_FILES="$CONFIG_FILES moap/publish/Makefile" ;; "moap/util/Makefile") CONFIG_FILES="$CONFIG_FILES moap/util/Makefile" ;; "moap/vcs/Makefile") CONFIG_FILES="$CONFIG_FILES moap/vcs/Makefile" ;; "moap/test/Makefile") CONFIG_FILES="$CONFIG_FILES moap/test/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "misc/Makefile") CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;; "moap.spec") CONFIG_FILES="$CONFIG_FILES moap.spec" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then ac_cs_awk_getline=: ac_cs_awk_pipe_init= ac_cs_awk_read_file=' while ((getline aline < (F[key])) > 0) print(aline) close(F[key])' ac_cs_awk_pipe_fini= else ac_cs_awk_getline=false ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" ac_cs_awk_read_file=' print "|#_!!_#|" print "cat " F[key] " &&" '$ac_cs_awk_pipe_init # The final `:' finishes the AND list. ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' fi ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } rm -f conf$$files.sh { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } if (nfields == 3 && !substed) { key = field[2] if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { \$ac_cs_awk_read_file next } } print line } \$ac_cs_awk_pipe_fini _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then $AWK -f "$tmp/subs.awk" else $AWK -f "$tmp/subs.awk" | $SHELL fi >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi if test "x$HAVE_RDF" = "xno" then echo echo "Could not import RDF." echo "doap-related functionality will not work until you install it." fi moap-0.2.7/moap.doap0000664000076400007640000001451011220502736011207 00000000000000 MOAP moap 2006-06-11 MOAP is a swiss army knife for project maintainers and developers. MOAP is a swiss army knife for project maintainers and developers. It aims to help in keeping you in the flow of maintaining, developing and releasing, automating whatever tasks can be automated. It allows you to parse DOAP files and submit releases, send release mails, create iCal files and RSS feeds, maintain version control ignore lists, check in based on the latest ChangeLog entry, and more. python Thomas Vander Stichele 0.2.7 trunk MMM... 2009-06-24 Added moap vcs backup, a command to backup a checkout to a tarball that can be used later to reconstruct the checkout. Implemented for svn. Fixes for git-svn, git, svn and darcs. Fixes for Python 2.3 and Python 2.6 0.2.6 trunk Nerd Night 2008-05-23 Added support for git-svn. Fix brz diff. Added moap changelog find to search through a ChangeLog. Added man page. Added moap tracadmin to administrate trac installations. Added changed properties/added/deleted files when preparing ChangeLog entries. Added checking of unchanged ChangeLog entry template. 0.2.5 trunk Matonge 2007-06-24 Added support for dc:description in .doap files to list the release's features. Added bugzilla implementation for moap bug and moap doap bug. Added better support for detecting exuberant ctags. Added support for filing bugs for missing dependencies/distros. Added Bazaar and Git backend for version control system features. Added "moap changelog contributors" to get a list of contributors to a release. Changed default behaviour for "moap changelog prepare" to not extract tags. Added -c, --ctags option to "moap changelog prepare" to extract tags. Added "help" command to "moap" and all its subcommands. 0.2.4 trunk Pacito 2007-05-20 Added RSS 2.0 feed generation from .doap release entries using Genshi or Cheetah templates. Added support for CHANGE_LOG_EMAIL_ADDRESS environment variable to moap changelog prepare. Added parsing of wiki attribute of a .DOAP project. Implemented "moap doap search" to search Google or Yahoo for your project's home page. Added support for multiple doap files to "moap doap" Added code to check the user's distribution and offer hints on how to install dependencies. 0.2.3 trunk Ketnet 2007-04-17 0.2.2 trunk Airlines 2007-03-25 0.2.1 trunk Ambulance 2007-02-04 0.2.0 trunk Waffle Flop 2006-12-17 moap-0.2.7/etc/0000777000076400007640000000000011220504670010241 500000000000000moap-0.2.7/etc/Makefile.in0000664000076400007640000003351311220504524012227 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = etc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = bash_completion.d all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu etc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive distclean distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/etc/bash_completion.d/0000777000076400007640000000000011220504670013631 500000000000000moap-0.2.7/etc/bash_completion.d/Makefile.in0000664000076400007640000002407511220504524015622 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = etc/bash_completion.d DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(completiondir)" completionDATA_INSTALL = $(INSTALL_DATA) DATA = $(completion_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ completiondir = $(sysconfdir)/bash_completion.d completion_DATA = moap BUILT_SOURCES = moap CLEANFILES = moap EXTRA_DIST = bash-compgen ENTRY = moap.main.Moap all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/bash_completion.d/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu etc/bash_completion.d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-completionDATA: $(completion_DATA) @$(NORMAL_INSTALL) test -z "$(completiondir)" || $(MKDIR_P) "$(DESTDIR)$(completiondir)" @list='$(completion_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(completionDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(completiondir)/$$f'"; \ $(completionDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(completiondir)/$$f"; \ done uninstall-completionDATA: @$(NORMAL_UNINSTALL) @list='$(completion_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(completiondir)/$$f'"; \ rm -f "$(DESTDIR)$(completiondir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(completiondir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-completionDATA install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-completionDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-completionDATA install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-completionDATA moap: bash-compgen $(top_srcdir)/moap $(top_srcdir)/moap/* PYTHONPATH=$(top_srcdir):$$PYTHONPATH $(srcdir)/bash-compgen \ $(completion_DATA) $(ENTRY) > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/etc/bash_completion.d/Makefile.am0000664000076400007640000000050110623420465015604 00000000000000completiondir = $(sysconfdir)/bash_completion.d completion_DATA = moap BUILT_SOURCES = moap CLEANFILES = moap EXTRA_DIST = bash-compgen ENTRY = moap.main.Moap moap: bash-compgen $(top_srcdir)/moap $(top_srcdir)/moap/* PYTHONPATH=$(top_srcdir):$$PYTHONPATH $(srcdir)/bash-compgen \ $(completion_DATA) $(ENTRY) > $@ moap-0.2.7/etc/bash_completion.d/bash-compgen0000775000076400007640000001436310603476174016062 00000000000000#!/usr/bin/env python # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # generate bash completion for all commands # first argument should be program name # second argument should be the main Command entry class's fully qualified name import sys def funcName(cmd): """ Generate a name for the given command by walking up the ancestry and seperating with underscore. """ l = [cmd.name] while cmd.parentCommand: cmd = cmd.parentCommand l.append(cmd.name) l.reverse() return "_%s_complete_" % cmd.name + "_".join(l) def generateOneCommand(cmd): function = funcName(cmd) commandList = cmd.subCommands.keys() commandList.sort() commands = '"' + " ".join(commandList) + '"' # poking into private instance variables for optparse.Option is nasty, # but I see no alternative optionBooleanList = [] optionValueList = [] optionList = [] for option in cmd.parser.option_list: optionList.extend(option._short_opts + option._long_opts) if not option.nargs: optionBooleanList.extend(option._short_opts + option._long_opts) else: optionValueList.extend(option._short_opts + option._long_opts) optionList.sort() options = '"' + " ".join(optionList) + '"' optionsBoolean = '"' + " ".join(optionBooleanList) + '"' optionsValue = '"' + " ".join(optionValueList) + '"' name = cmd.name return """ %(function)s() { options=%(options)s optionsboolean=%(optionsBoolean)s optionsvalue=%(optionsValue)s commands=%(commands)s completed=false debug "function %(function)s" debug "args '$@'" debug "ARG1 '$1'" debug "ARG2 '$2'" shift debug "after shift: args '$@'" debug "ARG1 '$1'" debug "ARG2 '$2'" while [[ "$completed" == "false" ]] do if [[ "$1" == -* ]] then # handle as argument debug "handling argument $#" # found will be set to true when the current argument fully matches # an option, causing us to swallow it found=false # first check for boolean options for option in $optionsboolean do debug "matching option $option to args $1" if [[ "$option" == "$1" ]] then debug "found full boolean option $option, eating" found=true shift fi done # then check for valued options if [[ "$found" == false ]] then for option in $optionsvalue do debug "matching option $option to args $1" if [[ "$option" == "$1" ]] then found=true if [[ $# -eq 1 ]] then # a valued option with no value # we can't complete this since we don't know what # values the option takes completed=true COMPREPLY=() else # eat option and its value shift 2 fi fi done fi if [[ "$found" == false ]] then debug "completing argument" COMPREPLY=( $( compgen -W "$options" -- $1 ) ) debug "COMPREPLY ${COMPREPLY[*]}" completed=true fi else # handle as command debug "handle as command" found=false if [[ $# -eq 0 ]]; then # completing this command COMPREPLY=( $( compgen -W "$commands" -- $1 ) ) debug "command, COMPREPLY ${COMPREPLY[*]}" completed=true else for command in $commands do debug "matching arg $1 against command $command" if [[ "$command" == "$1" ]] then debug "found full command, delegating" # completing a subcommand, delegate debug "delegate, $# args, 1 is $1" %(function)s_$1 $@ debug "delegated, COMPREPLY ${COMPREPLY[*]}" found=true fi done # if not found, we must still be wanting to complete the # current partial command if [[ "$found" == false ]] then COMPREPLY=( $( compgen -W "$commands" -- $1 ) ) completed=true fi fi fi debug "function %(function)s: COMPREPLY ${COMPREPLY[*]}" done } """ % locals() def generateSubCommands(cmd): snippets = [] if cmd.subCommands: for subCommand in cmd.subCommands.values(): snippets.extend(generateSubCommands(subCommand)) snippets.append(generateOneCommand(cmd)) return snippets def start(): if len(sys.argv) != 3: sys.stderr.write('Usage: %s [program-name] [entry-class]\n') sys.exit(1) name = sys.argv[1] entry = sys.argv[2] parts = entry.split('.') if len(parts) <= 1: sys.stderr.write( 'The entry class should be a module-qualified Class.\n') sys.exit(1) module = ".".join(parts[:-1]) command = "from %s import %s as EntryClass" % (module, parts[-1]) exec command entry = EntryClass() print """#-*- mode: shell-script;-*- # Programmed completion for bash to use %s """ % name print "\n".join(generateSubCommands(entry)) print """ # helper debug function debug() { if [[ ! -z "$DEBUG" ]] then echo $@ fi } # main entry point # dispatches to a command-specific function, passing in the rest of the # command line as arguments, starting with the command name being called _%(name)s() { COMPREPLY=() # pass as a list, not as a single string _%(name)s_complete_%(name)s ${COMP_WORDS[*]} } complete -F _%(name)s -o default %(name)s """ % locals() start() moap-0.2.7/etc/Makefile.am0000664000076400007640000000003410566703530012220 00000000000000SUBDIRS = bash_completion.d moap-0.2.7/misc/0000777000076400007640000000000011220504670010421 500000000000000moap-0.2.7/misc/header.py0000644000076400007640000000153010540745417012150 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # Moap - maintenance of a project # Copyright (C) 2006 Thomas Vander Stichele # 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 Street #330, Boston, MA 02111-1307, USA. moap-0.2.7/misc/Makefile.in0000664000076400007640000002057111220504524012407 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = misc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ pycheckerrc \ header.py \ moap-uninstalled \ show-coverage.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu misc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu misc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/misc/Makefile.am0000644000076400007640000000012110612742440012366 00000000000000EXTRA_DIST = \ pycheckerrc \ header.py \ moap-uninstalled \ show-coverage.py moap-0.2.7/misc/show-coverage.py0000644000076400007640000000466310540745417013503 00000000000000import os import sys class Presentation: def __init__(self, name, lines, covered): self.name = name self.lines = lines self.covered = covered if self.covered == 0: self.percent = 0 else: self.percent = 100 * self.covered / float(self.lines) def show(self, maxlen=20): format = '%%-%ds %%3d %%%% (%%4d / %%4d)' % maxlen print format % (self.name, self.percent, self.covered, self.lines) class Coverage: def __init__(self): self.files = [] self.total_lines = 0 self.total_covered = 0 def _strip_filename(self, filename): filename = os.path.basename(filename) if filename.endswith('.cover'): filename = filename[:-6] return filename def add_file(self, file): self.files.append(file) def show_results(self): if not hasattr(self, 'files'): print 'No coverage data' return self.maxlen = max(map(lambda f: len(self._strip_filename(f)), self.files)) print 'Coverage report:' print '-' * (self.maxlen + 23) for file in self.files: self.show_one(file) print '-' * (self.maxlen + 23) p = Presentation('Total', self.total_lines, self.total_covered) p.show(self.maxlen) def show_one(self, filename): f = open(filename) lines = [line for line in f.readlines() if (':' in line or line.startswith('>>>>>>')) and not line.strip().startswith('#') and not line.endswith(':\n')] uncovered_lines = [line for line in lines if line.startswith('>>>>>>')] if not lines: return filename = self._strip_filename(filename) p = Presentation(filename, len(lines), len(lines) - len(uncovered_lines)) p.show(self.maxlen) self.total_lines += p.lines self.total_covered += p.covered def main(args): c = Coverage() files = args[1:] files.sort() for file in files: if 'flumotion.test' in file: continue if '__init__' in file: continue c.add_file(file) c.show_results() if __name__ == '__main__': sys.exit(main(sys.argv)) moap-0.2.7/misc/moap-uninstalled0000775000076400007640000000370111220443712013541 00000000000000#!/bin/bash -i # # set up environment to use and develop uninstalled # # set up PATH, PYTHONPATH # # prefer uninstalled versions, but also put installed ones on the path # # symlink this script in a directory in your path (for example $HOME/bin) # to a name that reflects the version of your checkout # this script is run -i so that PS1 doesn't get cleared self=$0 absolute=$self if test -L $absolute then # find what the symlink points to absolute=`stat $absolute -c %N -t | sed 's/^.* -> .//g' | sed 's/.$//g'` fi MISCDIR=`dirname $absolute` BASEDIR=`cd $MISCDIR/.. && pwd` # extract version from $0 # if this script is called "...-head" then version will be "head" PROJECT=`basename $self | sed s/-.*//g` VERSION=`basename $self | sed s/.*-//g` options= # set up a bunch of paths export PATH=$BASEDIR/bin${PATH:+:$PATH} export PYTHONPATH=$BASEDIR${PYTHONPATH:+:$PYTHONPATH} # set up bash completion if we have it tmp= if echo $SHELL | grep bash > /dev/null then if test -d $BASEDIR/etc/bash_completion.d then # we need to create our own temporary bashrc replacement from the user's # and our completion stuff tmp=`mktemp -t bashrc.$PROJECT-$VERSION.XXXXXXXX` if test -e $HOME/.bashrc then cat $HOME/.bashrc > $tmp fi cat $BASEDIR/etc/bash_completion.d/$PROJECT >> $tmp SHELL_OPTIONS="--init-file $tmp" options="(with bash completion)" fi fi # if we got a command, run it, else start a shell if test ! -z "$1"; then $@ exit $? fi # set up prompt to help us remember we're in a subshell, cd to # the base directory and start $SHELL cd $BASEDIR shell=$SHELL if test "x$SHELL" == "x/bin/bash" then # debian/ubuntu resets our PS1. bastards. if test -e /etc/debian_version then SHELL_OPTIONS="$SHELL_OPTIONS --noprofile" fi fi echo Entering interactive $PROJECT shell $SHELL $options PS1="[$PROJECT-$VERSION] $PS1" $SHELL $SHELL_OPTIONS if test ! -z "$tmp" then rm $tmp fi echo Thank you for using $PROJECT. moap-0.2.7/misc/pycheckerrc0000644000076400007640000001340510610310026012555 00000000000000# -*- python -*- # .pycheckrc file created by PyChecker v0.8.14 @ Thu Oct 21 19:22:09 2004 # # It should be placed in your home directory (value of $HOME). # If $HOME is not set, it will look in the current directory. # # list of evil C extensions that crash the interpreter evil = [] # unused imports importUsed = 1 # unused imports from __init__.py packageImportUsed = 1 # module imports itself reimportSelf = 0 # reimporting a module moduleImportErrors = 0 # module does import and from ... import mixImport = 0 # unused local variables, except tuples localVariablesUsed = 1 # all unused local variables, including tuples unusedLocalTuple = 0 # all unused class data members membersUsed = 0 # all unused module variables allVariablesUsed = 0 # unused private module variables privateVariableUsed = 0 # report each occurrence of global warnings reportAllGlobals = 0 # functions called with named arguments (like keywords) namedArgs = 0 # Attributes (members) must be defined in __init__() onlyCheckInitForMembers = 0 # Subclass.__init__() not defined initDefinedInSubclass = 0 # Baseclass.__init__() not called baseClassInitted = 0 # Subclass needs to override methods that only throw exceptions abstractClasses = 0 # Return None from __init__() returnNoneFromInit = 1 # unreachable code unreachableCode = 0 # a constant is used in a conditional statement constantConditions = 1 # 1 is used in a conditional statement (if 1: or while 1:) constant1 = 0 # check if iterating over a string stringIteration = 1 # check improper use of string.find() # This is new in pychecker 0.8.14 which is not installed everywhere #stringFind = 1 # Calling data members as functions callingAttribute = 0 # class attribute does not exist # FIXME: need to fix bug in pychecker so we can disable this per admin_gtk # class # classAttrExists = 1 classAttrExists = 0 # First argument to methods methodArgName = 'self' # First argument to classmethods # classmethodArgNames = ['cls', 'klass'] # unused method/function arguments argumentsUsed = 0 # unused method/function variable arguments varArgumentsUsed = 0 # ignore if self is unused in methods ignoreSelfUnused = 0 # check if overridden methods have the same signature checkOverridenMethods = 0 # check if __special__ methods exist and have the correct signature checkSpecialMethods = 1 # check if function/class/method names are reused redefiningFunction = 1 # check if using unary positive (+) which is usually meaningless unaryPositive = 1 # check if modify (call method) on a parameter that has a default value modifyDefaultValue = 1 # check if variables are set to different types inconsistentTypes = 0 # check if unpacking a non-sequence unpackNonSequence = 1 # check if unpacking sequence with the wrong length unpackLength = 1 # check if raising or catching bad exceptions badExceptions = 1 # check if statement appears to have no effect noEffect = 1 # check if using (expr % 1), it has no effect on integers and strings modulo1 = 1 # check if using (expr is const-literal), doesn't always work on integers and strings isLiteral = 1 # check consistent return values checkReturnValues = 1 # check if using implict and explicit return values checkImplicitReturns = 0 # check that attributes of objects exist checkObjectAttrs = 1 # various warnings about incorrect usage of __slots__ slots = 1 # using properties with classic classes classicProperties = 1 # check if __slots__ is empty emptySlots = 1 # check if using integer division intDivide = 1 # check if local variable shadows a global # disabled because it doesn't give useful output: # test_input/test24.py:11: Local variable (shadow) shadows global defined on line 0 in file shadows = 0 # check if a variable shadows a builtin shadowBuiltins = 1 # check if input() is used usesInput = 1 # check if the exec statement is used usesExec = 0 # ignore warnings from files under standard library ignoreStandardLibrary = 1 # ignore warnings from the list of modules blacklist = [ 'gtk', 'twisted', 'twisted.python', 'pyexpat', 'zope.interface', 'zope.interface.declarations', 'zope.interface.interface', '_interface_coptimizations', #warning: couldn't find real module for class xml.parsers.expat.ExpatError (module name: xml.parsers.expat) 'xml.parsers.expat', ] # ignore global variables not used if name is one of these values variablesToIgnore = ['__version__', '__warningregistry__', '__all__', '__credits__', '__test__', '__author__', '__email__', '__revision__'] # ignore unused locals/arguments if name is one of these values unusedNames = ['_', 'empty', 'unused', 'dummy'] # ignore use of deprecated modules/functions deprecated = 1 # maximum lines in a function maxLines = 250 # maximum branches in a function maxBranches = 50 # maximum returns in a function maxReturns = 10 # maximum # of arguments to a function maxArgs = 10 # maximum # of locals in a function maxLocals = 40 # maximum # of identifier references (Law of Demeter) maxReferences = 5 # no module doc strings noDocModule = 0 # no class doc strings noDocClass = 0 # no function/method doc strings noDocFunc = 0 # print internal checker parse structures printParse = 0 # turn on debugging for checker debug = 0 # suppressions work like this suppressions = { # FIXME: Consumption has a get_next with steps=None 'flumotion.wizard.steps.Consumption': "no-override", # FIXME: the import there is for registering steps; do an actual method 'flumotion.wizard.wizard.Wizard': "no-import", # 'flumotion.twisted.defer.defer_generator': "self=wrapperself", # deferToThread imports reactor, which e.g. flumotion.worker.checks.video010 # does as well 'twisted.internet.threads.deferToThread' : "no-shadow", # FIXME: doing this inline doesn't seem to work 'flumotion.component.producers.looper.admin_gtk.py': 'no-classattr', } moap-0.2.7/HACKING0000664000076400007640000000125110626014507010376 00000000000000Adding a Version Control System ------------------------------- Easiest is to copy a file from one of the others that most resembles the new one in structure. moap/vcs/vcs.py is the base class that lists the functions yours needs to implement. Also add a matching test as moap/test/test_vcs_(yourvcs).py by copying from the other VCS's test file. Fix up the module/class names and creation of repositories in the test file to verify that your implementation works. Python ------ MOAP is written for Python 2.3 or higher. Style guide ----------- The Python Style PEP is followed as much as possible. Because of overexposure to Twisted, MOAP uses camelCase function/method names. moap-0.2.7/configure.ac0000664000076400007640000000342511220504443011674 00000000000000dnl initialize autoconf dnl when going to/from release please remove/add the nano (fourth number) dnl releases only do Wall, cvs and prerelease does Werror too AC_INIT(moap, 0.2.7, http://thomas.apestaart.org/moap/trac/newticket, moap) dnl initialize automake AM_INIT_AUTOMAKE dnl define PACKAGE_VERSION_* variables AS_VERSION AS_NANO dnl authors AC_SUBST_FILE(AUTHORS) AUTHORS=$srcdir/AUTHORS dnl AM_MAINTAINER_MODE only provides the option to configure to enable it AM_MAINTAINER_MODE dnl Add parameters for aclocal AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") dnl check for python AS_PATH_PYTHON(2.3) dnl check for where to install our python stuff dnl PYTHONLIBDIR=`$PYTHON -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"` PYVER=[`$PYTHON -c "import sys ; print sys.version[:3]"`] PYTHONLIBDIR=\${libdir}/python$PYVER/site-packages AC_MSG_NOTICE(Installing python code in $PYTHONLIBDIR) AC_SUBST(PYTHONLIBDIR) dnl check for RDF AS_PYTHON_IMPORT([RDF], HAVE_RDF="yes", HAVE_RDF="no") dnl check for epydoc AC_CHECK_PROG(EPYDOC, epydoc, yes, no) AM_CONDITIONAL(HAVE_EPYDOC, test "x$EPYDOC" = "xyes") dnl check for pychecker AC_CHECK_PROG(PYCHECKER, pychecker, yes, no) AM_CONDITIONAL(HAVE_PYCHECKER, test "x$PYCHECKER" = "xyes") dnl output stuff AC_OUTPUT( Makefile bin/Makefile etc/Makefile etc/bash_completion.d/Makefile m4/Makefile moap/Makefile moap/bug/Makefile moap/command/Makefile moap/configure/Makefile moap/configure/uninstalled.py moap/configure/installed.py moap/doap/Makefile moap/extern/Makefile moap/publish/Makefile moap/util/Makefile moap/vcs/Makefile moap/test/Makefile doc/Makefile misc/Makefile moap.spec ) if test "x$HAVE_RDF" = "xno" then echo echo "Could not import RDF." echo "doap-related functionality will not work until you install it." fi moap-0.2.7/m4/0000777000076400007640000000000011220504670010006 500000000000000moap-0.2.7/m4/as-python.m40000644000076400007640000001551610540745415012126 00000000000000dnl as-python.m4 0.1.1 dnl autostars m4 macro for python checks dnl From Andrew Dalke dnl Updated by James Henstridge dnl Updated by Andy Wingo to loop through possible pythons dnl Updated by Thomas Vander Stichele to check for presence of packages/modules dnl $Id: as-python.m4,v 1.3 2006/02/28 16:49:31 thomasvs Exp $ # AS_PATH_PYTHON([MINIMUM-VERSION]) # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # If the MINIMUM-VERSION argument is passed, AS_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. # Updated to loop over all possible python binaries by Andy Wingo # AC_DEFUN([AS_PATH_PYTHON], [ dnl Find a version of Python. I could check for python versions 1.4 dnl or earlier, but the default installation locations changed from dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages dnl in 1.5, and I don't want to maintain that logic. dnl should we do the version check? ifelse([$1],[], [AC_PATH_PROG(PYTHON, python python2.1 python2.0 python1.6 python1.5)], [ AC_MSG_NOTICE(Looking for Python version >= $1) changequote(<<, >>)dnl prog=" import sys, string minver = '$1' pyver = string.split(sys.version)[0] # first word is version string # split strings by '.'. just compare textually to allow for versions like # 2.4.1a0 minver = string.split(minver, '.') pyver = string.split(pyver, '.') # we can now do comparisons on the two lists: if pyver >= minver: sys.exit(0) else: sys.exit(1)" changequote([, ])dnl python_good=false for python_candidate in python python2.2 python2.1 python2.0 python2 python1.6 python1.5; do unset PYTHON AC_PATH_PROG(PYTHON, $python_candidate) 1> /dev/null 2> /dev/null if test "x$PYTHON" = "x"; then continue; fi if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC; then AC_MSG_CHECKING(["$PYTHON":]) AC_MSG_RESULT([okay]) python_good=true break; else dnl clear the cache val unset ac_cv_path_PYTHON fi done ]) if test "$python_good" != "true"; then AC_MSG_ERROR([No suitable version of python found]) fi AC_MSG_CHECKING([local Python configuration]) dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. Need to change quote character because of [:3] AC_SUBST(PYTHON_VERSION) changequote(<<, >>)dnl PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"` changequote([, ])dnl dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST(PYTHON_PREFIX) PYTHON_PREFIX='${prefix}' AC_SUBST(PYTHON_EXEC_PREFIX) PYTHON_EXEC_PREFIX='${exec_prefix}' dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_SUBST(PYTHON_PLATFORM) PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"` dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behaviour dnl is more consistent with lispdir.m4 for example. dnl dnl Also, if the package prefix isn't the same as python's prefix, dnl then the old $(pythondir) was pretty useless. AC_SUBST(pythondir) pythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. dnl Maybe this should be put in python.am? AC_SUBST(pkgpythondir) pkgpythondir=\${pythondir}/$PACKAGE dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) Was PYTHON_SITE_EXEC in previous betas. AC_SUBST(pyexecdir) pyexecdir=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) dnl Maybe this should be put in python.am? AC_SUBST(pkgpyexecdir) pkgpyexecdir=\${pyexecdir}/$PACKAGE AC_MSG_RESULT([looks good]) ]) dnl AS_PYTHON_IMPORT(PACKAGE/MODULE, [ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND, [PREAMBLE, [POSTAMBLE]]]]) dnl Try to import the given PACKAGE/MODULE AC_DEFUN([AS_PYTHON_IMPORT], [ dnl Check if we can import a given module. dnl Requires AS_PATH_PYTHON to be called before. dnl PREAMBLE and POSTAMBLE, if given, is code executed right before and after dnl the import AC_MSG_CHECKING([for python module $1]) prog=" import sys try: $4 import $1 $5 sys.exit(0) except ImportError: sys.exit(1) except SystemExit: raise except Exception, e: print ' Error while trying to import $1:' print ' %r: %s' % (e, e) sys.exit(1)" if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC then AC_MSG_RESULT(found) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(not found) ifelse([$3], , :, [$3]) fi ]) dnl a macro to check for ability to create python extensions dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) dnl function also defines PYTHON_INCLUDES AC_DEFUN([AM_CHECK_PYTHON_HEADERS], [ AC_REQUIRE([AM_PATH_PYTHON]) AC_MSG_CHECKING(for headers required to compile python extensions) dnl deduce PYTHON_INCLUDES py_prefix=`$PYTHON -c "import sys; print sys.prefix"` py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" if test "$py_prefix" != "$py_exec_prefix"; then PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" fi AC_SUBST(PYTHON_INCLUDES) dnl check if the headers exist: save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" AC_TRY_CPP([#include ],dnl [AC_MSG_RESULT(found) $1],dnl [AC_MSG_RESULT(not found) $2]) CPPFLAGS="$save_CPPFLAGS" ]) moap-0.2.7/m4/as-version.m40000644000076400007640000000377010540745415012271 00000000000000dnl as-version.m4 0.2.0 dnl autostars m4 macro for versioning dnl Thomas Vander Stichele dnl $Id: as-version.m4,v 1.4 2004/06/01 09:40:05 thomasvs Exp $ dnl AS_VERSION dnl example dnl AS_VERSION dnl this macro dnl - AC_SUBST's PACKAGE_VERSION_MAJOR, _MINOR, _MICRO dnl - AC_SUBST's PACKAGE_VERSION_RELEASE, dnl which can be used for rpm release fields dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents dnl maintainer mode from running correctly dnl dnl don't forget to put #undef PACKAGE_VERSION_RELEASE in acconfig.h dnl if you use acconfig.h AC_DEFUN([AS_VERSION], [ PACKAGE_VERSION_MAJOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f1) PACKAGE_VERSION_MINOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f2) PACKAGE_VERSION_MICRO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f3) AC_SUBST(PACKAGE_VERSION_MAJOR) AC_SUBST(PACKAGE_VERSION_MINOR) AC_SUBST(PACKAGE_VERSION_MICRO) ]) dnl AS_NANO(ACTION-IF-NO-NANO, [ACTION-IF-NANO]) dnl requires AC_INIT to be called before dnl For projects using a fourth or nano number in your versioning to indicate dnl development or prerelease snapshots, this macro allows the build to be dnl set up differently accordingly. dnl this macro: dnl - parses AC_PACKAGE_VERSION, set by AC_INIT, and extracts the nano number dnl - sets the variable PACKAGE_VERSION_NANO dnl - sets the variable PACKAGE_VERSION_RELEASE, which can be used dnl for rpm release fields dnl - executes ACTION-IF-NO-NANO or ACTION-IF-NANO dnl example: dnl AS_NANO(RELEASE="yes", RELEASE="no") AC_DEFUN([AS_NANO], [ AC_MSG_CHECKING(nano version) NANO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f4) if test x"$NANO" = x || test "x$NANO" = "x0" ; then AC_MSG_RESULT([0 (release)]) NANO=0 PACKAGE_VERSION_RELEASE=1 ifelse([$1], , :, [$1]) else AC_MSG_RESULT($NANO) PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S` ifelse([$2], , :, [$2]) fi PACKAGE_VERSION_NANO=$NANO AC_SUBST(PACKAGE_VERSION_NANO) AC_SUBST(PACKAGE_VERSION_RELEASE) ]) moap-0.2.7/m4/Makefile.in0000664000076400007640000002051111220504524011766 00000000000000# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = m4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-python.m4 \ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EPYDOC = @EPYDOC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYCHECKER = @PYCHECKER@ PYTHON = @PYTHON@ PYTHONLIBDIR = @PYTHONLIBDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = as-version.m4 as-python.m4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: moap-0.2.7/m4/pychecker.mk0000644000076400007640000000320611220173215012226 00000000000000# configure.ac needs to AM_CONDITIONAL HAVE_PYCHECKER if HAVE_PYCHECKER check-local-pychecker: pychecker else check-local-pychecker: echo "Pychecker not found, passing" endif # include this snippet for the pychecker stuff # Makefile.am needs to define # PYCHECKER_WHITELIST # and # PYCHECKER_BLACKLIST # can be overridden to point to a different pychecker PYCHECKER = pychecker pychecker_setup = `ls $(top_srcdir)/misc/setup.py 2> /dev/null` pychecker_help = `ls $(top_srcdir)/misc/pycheckerhelp.py 2> /dev/null` pychecker = \ $(PYCHECKER) -Q -F misc/pycheckerrc \ $(pychecker_setup) \ $(pychecker_help) # during distcheck, we get executed from $(NAME)-$(VERSION)/_build, while # our python sources are one level up. Figure this out and set a OUR_PATH # this uses Makefile syntax, so we need to protect it from automake thisdir = $(shell basename `pwd`) OUR_PATH = $(if $(subst _build,,$(thisdir)),$(shell pwd),$(shell pwd)/..) pychecker_files = $(filter-out $(PYCHECKER_BLACKLIST),$(wildcard $(PYCHECKER_WHITELIST))) # we redirect stderr so we don't get messages like # warning: couldn't find real module for class SSL.Error (module name: SSL) # which can't be turned off in pychecker pycheckersplit: @echo running pychecker on each file ... @for file in $(pychecker_all_files) do \ $(pychecker) $$file > /dev/null 2>&1 \ if test $$? -ne 0; then \ echo "Error on $$file"; \ $(pychecker) $$file; break \ fi \ done pychecker: @echo running pychecker ... @$(pychecker) $(pychecker_files) 2>/dev/null || make pycheckerverbose pycheckerverbose: @echo "running pychecker (verbose) ..." $(pychecker) $(pychecker_files) moap-0.2.7/m4/Makefile.am0000644000076400007640000000005010540745415011761 00000000000000EXTRA_DIST = as-version.m4 as-python.m4 moap-0.2.7/py-compile0000755000076400007640000001005611150667217011421 00000000000000#!/bin/sh # py-compile - Compile a Python program scriptversion=2005-05-14.22 # Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. # 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . if [ -z "$PYTHON" ]; then PYTHON=python fi basedir= destdir= files= while test $# -ne 0; do case "$1" in --basedir) basedir=$2 if test -z "$basedir"; then echo "$0: Missing argument to --basedir." 1>&2 exit 1 fi shift ;; --destdir) destdir=$2 if test -z "$destdir"; then echo "$0: Missing argument to --destdir." 1>&2 exit 1 fi shift ;; -h|--h*) cat <<\EOF Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." Byte compile some python scripts FILES. Use --destdir to specify any leading directory path to the FILES that you don't want to include in the byte compiled file. Specify --basedir for any additional path information you do want to be shown in the byte compiled file. Example: py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py Report bugs to . EOF exit $? ;; -v|--v*) echo "py-compile $scriptversion" exit $? ;; *) files="$files $1" ;; esac shift done if test -z "$files"; then echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 exit 1 fi # if basedir was given, then it should be prepended to filenames before # byte compilation. if [ -z "$basedir" ]; then pathtrans="path = file" else pathtrans="path = os.path.join('$basedir', file)" fi # if destdir was given, then it needs to be prepended to the filename to # byte compile but not go into the compiled file. if [ -z "$destdir" ]; then filetrans="filepath = path" else filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" fi $PYTHON -c " import sys, os, string, py_compile files = '''$files''' print 'Byte-compiling python modules...' for file in string.split(files): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue print file, sys.stdout.flush() py_compile.compile(filepath, filepath + 'c', path) print" || exit $? # this will fail for python < 1.5, but that doesn't matter ... $PYTHON -O -c " import sys, os, string, py_compile files = '''$files''' print 'Byte-compiling python modules (optimized versions) ...' for file in string.split(files): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue print file, sys.stdout.flush() py_compile.compile(filepath, filepath + 'o', path) print" 2>/dev/null || : # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: