[PATCH 1/7] doc/mkdocdeps.py: Convert execfile to import
authorW. Trevor King <wking@tremily.us>
Sat, 5 Apr 2014 17:31:05 +0000 (10:31 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:01:14 +0000 (10:01 -0800)
90/b21994aa3ead97cb8d482da8975b145805471b [new file with mode: 0644]

diff --git a/90/b21994aa3ead97cb8d482da8975b145805471b b/90/b21994aa3ead97cb8d482da8975b145805471b
new file mode 100644 (file)
index 0000000..82d2b2e
--- /dev/null
@@ -0,0 +1,110 @@
+Return-Path: <wking@tremily.us>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 68E3B431FC4\r
+       for <notmuch@notmuchmail.org>; Sat,  5 Apr 2014 10:31:33 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Tw31mttj7b9f for <notmuch@notmuchmail.org>;\r
+       Sat,  5 Apr 2014 10:31:26 -0700 (PDT)\r
+Received: from QMTA11.westchester.pa.mail.comcast.net\r
+       (qmta11.westchester.pa.mail.comcast.net [76.96.59.211])\r
+       by olra.theworths.org (Postfix) with ESMTP id DC7D4431FAF\r
+       for <notmuch@notmuchmail.org>; Sat,  5 Apr 2014 10:31:25 -0700 (PDT)\r
+Received: from omta02.westchester.pa.mail.comcast.net ([76.96.62.19])\r
+       by QMTA11.westchester.pa.mail.comcast.net with comcast\r
+       id mGB21n0040QuhwU5BHXRaE; Sat, 05 Apr 2014 17:31:25 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+       by omta02.westchester.pa.mail.comcast.net with comcast\r
+       id mHXQ1n00T152l3L3NHXRNP; Sat, 05 Apr 2014 17:31:25 +0000\r
+Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
+       by odin.tremily.us (Postfix) with ESMTPS id 3206D1103C12;\r
+       Sat,  5 Apr 2014 10:31:24 -0700 (PDT)\r
+Received: (nullmailer pid 16913 invoked by uid 1000);\r
+       Sat, 05 Apr 2014 17:31:15 -0000\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/7] doc/mkdocdeps.py: Convert execfile to import\r
+Date: Sat,  5 Apr 2014 10:31:05 -0700\r
+Message-Id:\r
+ <8d518408f2da8bc96ae3123f05791142da26b9bc.1396718720.git.wking@tremily.us>\r
+X-Mailer: git-send-email 1.9.1.353.gc66d89d\r
+In-Reply-To: <cover.1396718720.git.wking@tremily.us>\r
+References: <cover.1396718720.git.wking@tremily.us>\r
+In-Reply-To: <cover.1396718720.git.wking@tremily.us>\r
+References: <cover.1396718720.git.wking@tremily.us>\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+       s=q20140121; t=1396719085;\r
+       bh=hna/xxGjPPXp+BaF7YqRVNPn6WIgCOnieHoUQV75lgA=;\r
+       h=Received:Received:Received:Received:From:To:Subject:Date:\r
+       Message-Id;\r
+       b=uMmaG4tEPbR/zUUbjEfK/V7EPRQZDW40CveJCqAYFaqe/W3g7QdErCbI6DfnFRsxg\r
+       pdxkaGioohZcmoqd+0MscXqH+3MovRvmGhbJylhfUHWjKdZbVcnXt6zajYSfXo1Vs6\r
+       uzdu1J2C/gcaXywlp/rZJqHAv4Qg78zwxrr5/+eH0loryDhQ3/m0afhbJvEJSL6/EC\r
+       zte8fbfShAMBa411IqROYQkxc6eNh9Kza+5hEyTt2KI4RU8NruAlmKGOotbfFoSuRE\r
+       /vWxC4nGHH/vNE1fKCy/LJkLXClTF2dAQbJqEc3Myo6BO6gZQGaWBrwSDFVPRc/r+F\r
+       ipc80js3BHJRQ==\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 05 Apr 2014 17:31:33 -0000\r
+\r
+excefile is gone in Python 3 [1].  Instead of exec-ing the\r
+configuration, it's easier to insert the source directory in Python's\r
+path [2], and just import the configuration.  With this change,\r
+mkdocdeps.py is compatible with both Python 2 and 3.\r
+\r
+[1]: https://docs.python.org/3.0/whatsnew/3.0.html#builtins\r
+[2]: https://docs.python.org/3/library/sys.html#sys.path\r
+---\r
+ doc/mkdocdeps.py | 13 +++++++------\r
+ 1 file changed, 7 insertions(+), 6 deletions(-)\r
+\r
+diff --git a/doc/mkdocdeps.py b/doc/mkdocdeps.py\r
+index 71bd135..de1cbb8 100644\r
+--- a/doc/mkdocdeps.py\r
++++ b/doc/mkdocdeps.py\r
+@@ -1,15 +1,16 @@\r
+-from sys import argv\r
+-srcdir = argv[1]\r
+-builddir = argv[2]\r
+-outfile = argv[3]\r
++import sys\r
\r
+-execfile(srcdir + '/conf.py')\r
++srcdir = sys.argv[1]\r
++builddir = sys.argv[2]\r
++outfile = sys.argv[3]\r
\r
++sys.path.insert(0, srcdir)\r
++import conf\r
\r
+ roff_files = []\r
+ rst_files = []\r
+ out=open(outfile,'w')\r
+-for page in man_pages:\r
++for page in conf.man_pages:\r
+     rst_files = rst_files + ["{0:s}/{1:s}.rst".format(srcdir,page[0])]\r
+     roff_files = roff_files + ["{0:s}/man/{1:s}.{2:d}".format(builddir,page[0],page[4])]\r
\r
+-- \r
+1.9.1.353.gc66d89d\r
+\r