From 3264a9d571fc3eae9e097c6d2aa6137a87911d90 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sat, 3 Jan 2015 16:05:52 +0200 Subject: [PATCH] Re: [PATCH] build: eliminate use of python execfile command --- 1e/ba31a3380969b90a357fa29d677f0433c7a895 | 104 ++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 1e/ba31a3380969b90a357fa29d677f0433c7a895 diff --git a/1e/ba31a3380969b90a357fa29d677f0433c7a895 b/1e/ba31a3380969b90a357fa29d677f0433c7a895 new file mode 100644 index 000000000..b2859132d --- /dev/null +++ b/1e/ba31a3380969b90a357fa29d677f0433c7a895 @@ -0,0 +1,104 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id B5379431FBC + for ; Sat, 3 Jan 2015 06:06:22 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 4IwcGbUr7c5k for ; + Sat, 3 Jan 2015 06:06:19 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 642EA431FB6 + for ; Sat, 3 Jan 2015 06:06:19 -0800 (PST) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 38BD9100051; + Sat, 3 Jan 2015 16:05:52 +0200 (EET) +From: Tomi Ollila +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: [PATCH] build: eliminate use of python execfile command +In-Reply-To: <1420291282-2553-1-git-send-email-david@tethera.net> +References: <1420291282-2553-1-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.19+14~ge04617b (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 03 Jan 2015 14:06:22 -0000 + +On Sat, Jan 03 2015, David Bremner wrote: + +> As discussed in +> id:8cc9dd580ad672527e12f43706f9803b2c8e99d8.1405220724.git.wking@tremily.us, +> execfile is unavailable in python3. +> +> The approach of this commit avoids modifying the python module path, +> which is arguably preferable since it avoids potentially accidentally importing a module from the wrong place. + +Looks good, tests pass -- you could amend the commit message by adding one lost newline. + +Tomi + + + +> --- +> devel/release-checks.sh | 2 +- +> doc/prerst2man.py | 3 ++- +> 2 files changed, 3 insertions(+), 2 deletions(-) +> +> diff --git a/devel/release-checks.sh b/devel/release-checks.sh +> index 797d62a..ae02f55 100755 +> --- a/devel/release-checks.sh +> +++ b/devel/release-checks.sh +> @@ -130,7 +130,7 @@ else +> fi +> +> echo -n "Checking that python bindings version is $VERSION... " +> -py_version=`python -c "execfile('$PV_FILE'); print __VERSION__"` +> +py_version=`python -c "with open('$PV_FILE') as vf: exec(vf.read()); print __VERSION__"` +> if [ "$py_version" = "$VERSION" ] +> then +> echo Yes. +> diff --git a/doc/prerst2man.py b/doc/prerst2man.py +> index 437dea9..968722a 100644 +> --- a/doc/prerst2man.py +> +++ b/doc/prerst2man.py +> @@ -10,7 +10,8 @@ outdir = argv[2] +> if not isdir(outdir): +> makedirs(outdir, 0o755) +> +> -execfile(sourcedir + "/conf.py") +> +with open(sourcedir + "/conf.py") as cf: +> + exec(cf.read()) +> +> +> def header(file, startdocname, command, description, authors, section): +> -- +> 2.1.3 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2