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


Groups > comp.lang.python > #96789

Automating build from source (was: Automating Sphinx generated documentation)

Path csiph.com!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.038
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'sphinx': 0.07; 'subject:build': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'that).': 0.09; 'python': 0.10; 'files.': 0.13; 'commit': 0.15; 'build.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reflects': 0.16; 'unresolved': 0.16; 'vcs,': 0.16; 'deployment': 0.18; 'tree': 0.18; 'changes': 0.20; 'first,': 0.20; 'code,': 0.23; '(you': 0.23; 'changes,': 0.23; 'testing': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'separate': 0.27; 'question': 0.27; 'subject:skip:d 10': 0.27; 'idea': 0.28; 'this.': 0.28; 'base,': 0.29; 'build,': 0.29; "i'm": 0.30; 'code': 0.30; 'checked': 0.31; 'especially': 0.32; 'compiled': 0.32; 'though,': 0.32; 'source': 0.33; 'instead,': 0.33; 'changing': 0.34; 'so,': 0.35; 'newer': 0.35; 'step': 0.36; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'responsible': 0.37; 'received:org': 0.37; 'integration': 0.38; 'anything': 0.38; 'files': 0.38; 'end': 0.39; 'subject:from': 0.39; 'build': 0.40; 'to:addr:python.org': 0.40; 'different': 0.63; 'complete': 0.63; 'great': 0.63; 'our': 0.64; 'world': 0.64; 'continuous': 0.66; 'us:': 0.67; 'production': 0.67; 'us,': 0.69; 'products': 0.70; '\xe2\x80\x93': 0.72; 'directly.': 0.76; '_o__)': 0.84; 'humans': 0.84; 'received:125': 0.84; 'subject:source': 0.84; 'tree,': 0.84; 'step.': 0.91; 'that),': 0.91; '8bit%:18': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Ben Finney <ben+python@benfinney.id.au>
Subject Automating build from source (was: Automating Sphinx generated documentation)
Date Fri, 18 Sep 2015 09:37:21 +1000
References <41302A7145AC054FA7A96CFD03835A0A0B9D749B@EX10MBX02.EU.NEC.COM>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host jigong.madmonks.org
X-Public-Key-ID 0xAC128405
X-Public-Key-Fingerprint 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405
X-Public-Key-URL http://www.benfinney.id.au/contact/bfinney-pubkey.asc
X-Post-From Ben Finney <bignose+hates-spam@benfinney.id.au>
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
Cancel-Lock sha1:guIfAjU4HzaWKE91vthIjSjARwY=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.15.1442533060.16376.python-list@python.org> (permalink)
Lines 48
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1442533060 news.xs4all.nl 23734 [2001:888:2000:d::a6]:53294
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 5468
X-Received-Body-CRC 2528199
Xref csiph.com comp.lang.python:96789

Show key headers only | View raw


David Aldrich <David.Aldrich@EMEA.NEC.COM> 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.

> So, following changes to the Python code, I need to regenerate and
> commit the Sphinx generated documentation.

Instead, the build products – anything generated automatically by the
computer, such as the compiled code, compiled documentation – should be
flagged for “ignore” by the VCS, and never committed.

The VCS should track only those files that humans edit directly.

> I just wondered how people manage this. I'm thinking of using Jenkins
> (a continuous integration tool) to check for changes, regenerate the
> docs and check them in.

Deploying the code base, whether for testing or to staging or production
or wherever, should entail a build step. That build step is responsible
for going from source-files-only, checked out from the VCS, to a
complete ready-to-deploy tree of files.

That build step should always start from a clean source tree, so that
you always know the end result reflects what was committed to VCS.

Build tools include old-school Makefile, or newer tools like Meson.

Note that this is automated build. This is a different question from
automated deployment (you might like Fabric for that), and is a
different question from automated integration (you might like Jenkins
for that).

First, though, you need an automated build, so you can separate “what's
tracked in VCS” versus “what's generated automatically”.

-- 
 \       “If we listen only to those who are like us, we will squander |
  `\   the great opportunity before us: To live together peacefully in |
_o__)            a world of unresolved differences.” —David Weinberger |
Ben Finney

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


Thread

Automating build from source (was: Automating Sphinx generated documentation) Ben Finney <ben+python@benfinney.id.au> - 2015-09-18 09:37 +1000
  Re: Automating build from source (was: Automating Sphinx generated documentation) Grant Edwards <invalid@invalid.invalid> - 2015-09-18 01:54 +0000

csiph-web