Re: SVN:(AG)[71141] Change the SVN version in `constants.py`.

1 view
Skip to first unread message

Robin Dunn

unread,
Apr 7, 2012, 7:19:12 PM4/7/12
to wxPyth...@googlegroups.com
On 4/7/12 3:17 PM, nor...@wxsite.net wrote:
> # The SVN revision of wxWidgets/Phoenix used to build the Sphinx docs.
> # There must be a more intelligent way to get this information automatically.
> -SVN_REVISION = '71066'


import subprocess
svn_result = subprocess.Popen(["svn", "info"],
stdout=subprocess.PIPE).communicate()[0]
REV = 'unknown'
for line in svn_result.split("\n"):
if line.startswith("Revision"):
REV = line.split(":")[-1].strip()
break

# Do something with REV, like write it to constants.py

--
Robin Dunn
Software Craftsman
http://wxPython.org

Reply all
Reply to author
Forward
0 new messages