Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #38815

Re: Python Makefiles... are they possible?

Path csiph.com!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <benjamin@schollnick.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'modified': 0.05; 'nasty': 0.07; 'suppose': 0.07; 'python': 0.09; 'cc:addr:python-list': 0.10; '-name': 0.16; '.py': 0.16; 'benjamin': 0.16; 'make,': 0.16; 'meanwhile,': 0.16; 'preserving': 0.16; 'received:192.168.1.20': 0.16; 'sorts': 0.16; 'subject:possible': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'xargs': 0.16; 'deleted.': 0.17; 'documented': 0.17; 'mechanism': 0.17; 'module': 0.19; 'fairly': 0.21; 'cc:2**0': 0.23; 'seems': 0.23; 'project,': 0.24; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'leave': 0.26; 'bugs': 0.27; 'tree': 0.27; "doesn't": 0.28; 'run': 0.28; 'source': 0.29; 'gets': 0.32; 'file': 0.32; 'not.': 0.32; 'directory,': 0.33; 'another': 0.33; 'received:google.com': 0.34; 'clear': 0.35; 'moved': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'really': 0.36; 'created': 0.36; 'but': 0.36; 'compare': 0.36; 'depends': 0.36; 'anything': 0.36; 'should': 0.36; 'charset:us- ascii': 0.36; 'quite': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'some': 0.38; 'performance': 0.39; 'received:192': 0.39; 'build': 0.39; 'received:192.168': 0.40; 'your': 0.60; 'header:Message-Id:1': 0.62; 'different': 0.63; 'our': 0.65; 'matter.': 0.65; 'walk': 0.71; 'tree,': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=schollnick.net; s=schollnick; h=x-received:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to:x-mailer; bh=ArUc0wuI7RJdxh8wLkE3u1TC+wJmrSA9OlZrVSKdcaw=; b=aFfh4v1UJzpzxQmVzmMs/uqE46W7tM11um746qEh2sXoFJoDLL0Ry36hNLwJ7PidrG Tqf9Ks02gXfKebmHD364l/goeRc3A5ko3HcEua8+WQWPkOTWUArdcqE4m2oP1QN58R+U 1MpI6J0ti0VptCocsJRjvi1tKN2mUkbAjDT4I=
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to:x-mailer :x-gm-message-state; bh=ArUc0wuI7RJdxh8wLkE3u1TC+wJmrSA9OlZrVSKdcaw=; b=PmZ4AKgpGmiaVKPJv2CjrrcDgzbBEhtoieOWblznxird8W+b212rwseV8yaCXC49+c FTtd9CPmBnKr0GHHzw8euzTdP4+U6RbNuCeyXmkf5kGJZo6/7MeK7w2nSJhRdnwFot6g /1ewo3Bq8hV+bCTuIqr/XF87PInm214MDtCJVjVdqbYJ6+3dP0dzFcYiogu8rosQPJ2R dPciwFRWA+uKhdqSKvbdVQxkiQnLdX+m38kUBepJo3VQciKeVqecyvNwwDxkQZXMPvT8 xLFS7CI1Cqjs6qBr2EWfaWScpy1asWKDasEF6tQrWpyDJiE3eqls0AFnMGxB1iwj5kxc /1tg==
X-Received by 10.58.186.241 with SMTP id fn17mr1206538vec.8.1360752317420; Wed, 13 Feb 2013 02:45:17 -0800 (PST)
Sender Benjamin Schollnick <bschollnick@schollnick.net>
Content-Type multipart/alternative; boundary="Apple-Mail=_B5D2DAF0-115E-400C-B631-63085EE805AF"
Mime-Version 1.0 (Mac OS X Mail 6.2 \(1499\))
Subject Re: Python Makefiles... are they possible?
From Benjamin Schollnick <benjamin@schollnick.net>
In-Reply-To <511b2a7c$0$11096$c3e8da3@news.astraweb.com>
Date Wed, 13 Feb 2013 05:45:14 -0500
References <e8d436e1-f226-4a81-968f-295c51198198@googlegroups.com> <mailman.1731.1360717275.2939.python-list@python.org> <roy-270198.20063512022013@news.panix.com> <511b2a7c$0$11096$c3e8da3@news.astraweb.com>
To Steven D'Aprano <steve+comp.lang.python@pearwood.info>
X-Mailer Apple Mail (2.1499)
X-Gm-Message-State ALoCoQnNzEf8WFqTFzdA1UZpAj9av6BzbcKK94MrSojUNY5cy5EO9habpB1NkUpRSjZCUMAHWmWl
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1742.1360752320.2939.python-list@python.org> (permalink)
Lines 68
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1360752320 news.xs4all.nl 6870 [2001:888:2000:d::a6]:35051
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:38815

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

>> One thing we do in our Makefiles is "find . -name '*.pyc' | xargs rm".
>> It avoids all sorts of nasty and hard to track down bugs (consider what
>> happens if you move a .py file from one place in your source tree to
>> another and leave the old .pyc behind).
> 
> How often do you move files around in the source tree? Meanwhile, *every* 
> time you run make, you take a performance hit on every Python module in 
> your project, whether it has moved or not.
> 
> Seems to me like a fairly heavy-handed response for something quite rare, 
> but I suppose that depends on how often you run make.

If the performance hit doesn't really matter.  

Then simply walk the build tree, compare time date stamps, anything that doesn't match up in the make directory, gets deleted.  Anything that has different Date Created / Date Modified time from the build tree match, get's deleted.

This way, we are preserving any files that should be identical.  But there should be some mechanism documented to forcibly clear the build cache.

		- Benjamin

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python Makefiles... are they possible? Malcolm White <white.m88@gmail.com> - 2013-02-12 16:44 -0800
  Re: Python Makefiles... are they possible? Joel Goldstick <joel.goldstick@gmail.com> - 2013-02-12 19:55 -0500
  Re: Python Makefiles... are they possible? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-13 01:00 +0000
    Re: Python Makefiles... are they possible? Roy Smith <roy@panix.com> - 2013-02-12 20:06 -0500
      Re: Python Makefiles... are they possible? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-13 05:54 +0000
        Re: Python Makefiles... are they possible? Benjamin Schollnick <benjamin@schollnick.net> - 2013-02-13 05:45 -0500
        Re: Python Makefiles... are they possible? Dave Angel <d@davea.name> - 2013-02-13 08:33 -0500
        Re: Python Makefiles... are they possible? Roy Smith <roy@panix.com> - 2013-02-13 08:44 -0500
          Re: Python Makefiles... are they possible? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-14 13:46 +1100
            Re: Python Makefiles... are they possible? Roy Smith <roy@panix.com> - 2013-02-13 22:02 -0500
            Re: Python Makefiles... are they possible? Chris Angelico <rosuav@gmail.com> - 2013-02-14 17:43 +1100

csiph-web