Path: csiph.com!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: 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; 'binary': 0.05; 'cpython': 0.05; 'think,': 0.05; 'method,': 0.07; 'sphinx': 0.07; 'subject:build': 0.07; 'cc:addr:python-list': 0.09; 'agree,': 0.09; 'way:': 0.09; 'python': 0.10; 'python.': 0.11; 'files.': 0.13; 'commit': 0.15; '_do_': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.16; 'instance,': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'sep': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'fri,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'subject:skip:d 10': 0.27; 'idea': 0.28; 'equivalent.': 0.29; 'code': 0.30; 'especially': 0.32; 'problem': 0.33; 'source': 0.33; 'changing': 0.34; 'previous': 0.34; 'list': 0.34; 'received:google.com': 0.35; 'next': 0.35; 'files,': 0.35; 'something': 0.35; 'but': 0.36; 'there': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'someone': 0.38; 'files': 0.38; 'subject:from': 0.39; 'rather': 0.39; 'build': 0.40; 'where': 0.40; 'our': 0.64; 'built,': 0.84; 'chrisa': 0.84; 'precompiled': 0.84; 'restricts': 0.84; 'subject:source': 0.84; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=ipOuPwiw95/tijVuqN7yJPovGg/hsmrm1FR33ejbm9M=; b=QjKd1D+TbJKrfvLl5j1wiZRJ2tx7WbzcQiC0BCjjV7hCCKPZEosS6mDzrlQz9VHv++ E7CN7kmodORS9tBJdAiLjHGpPhU/HqQMrAv48xIL8gOpc9UkzEmsm9bmPVhUeAa90QYN rBwlprFtjhrEhLNq0Q5Y+78uZ/kmeGNfXztxlYDC0XCRW3reipLAZ375+597sV/bU3g2 ZoyJ7+fVAh+Er1ASeQvcOoIrt8JNrkerUTTUCwZU1hqavDT9BVRk+rFICNg28+YWH1hx Jp5FC25un5ZDLB/YS2Frn0qmJzijL6Oo46TmCNb5xLzV/W53ptMcIik+yFADWtOqua+F Gn1A== MIME-Version: 1.0 X-Received: by 10.107.33.81 with SMTP id h78mr11445547ioh.19.1442558312836; Thu, 17 Sep 2015 23:38:32 -0700 (PDT) In-Reply-To: <85vbb84nym.fsf@benfinney.id.au> References: <41302A7145AC054FA7A96CFD03835A0A0B9D749B@EX10MBX02.EU.NEC.COM> <85vbb84nym.fsf@benfinney.id.au> Date: Fri, 18 Sep 2015 16:38:32 +1000 Subject: Re: Automating build from source (was: Automating Sphinx generated documentation) From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442558316 news.xs4all.nl 23795 [2001:888:2000:d::a6]:47156 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96802 On Fri, Sep 18, 2015 at 9:37 AM, Ben Finney wrote: > David Aldrich writes: > >> I have setup Sphinx for my Python project. We keep all our code and >> documentation in Subversion. > > It's a good idea to keep *source* files in VCS. > > It's a bad idea to keep automatically-generated files in VCS; it's > especially bad to do so if they need to be generated again after > changing the source files. While I broadly agree, I would say this is a case of code smell rather than something outright verboten. There are a few situations where it's easier to commit the generated files as well; for instance, it can help you get around a bootstrapping problem - you use a previous build of Python to generate the frozen importlib, I think, and use that to build the next Python. (If that's not how CPython is built, my apologies; there are other projects that _do_ use this method, so it's just a flawed example.) If you don't commit the generated files, someone who wants to build from source has to first pick up a precompiled binary or somesuch. (Or, looking the other way: Disallowing generated files in source control restricts the generator to something that's already available on every build system.) But yes, as a general rule, I prefer to list all generated files in .gitignore or equivalent. ChrisA