mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 12:04:10 +00:00
Add hack to determine svn revision on Gentoo with svn ebuild.
This commit is contained in:
parent
b64393d096
commit
93e631d893
19
setup.py
19
setup.py
@ -52,11 +52,19 @@ try:
|
|||||||
if line.split(" ")[0] == "Revision:":
|
if line.split(" ")[0] == "Revision:":
|
||||||
revision_string = line.split(" ")[1].strip()
|
revision_string = line.split(" ")[1].strip()
|
||||||
break
|
break
|
||||||
|
# Try to get the SVN revision on Gentoo systems
|
||||||
|
if revision_string == "":
|
||||||
|
stdout = os.popen("svn info /usr/portage/distfiles/svn-src/deluge/deluge-0.6")
|
||||||
|
for line in stdout:
|
||||||
|
if line.split(" ")[0] == "Revision:":
|
||||||
|
revision_string = line.split(" ")[1].strip()
|
||||||
|
break
|
||||||
|
|
||||||
f = open("deluge/data/revision", "w")
|
f = open("deluge/data/revision", "w")
|
||||||
f.write(revision_string)
|
f.write(revision_string)
|
||||||
f.close()
|
f.close()
|
||||||
except Exception, e:
|
except:
|
||||||
print "Unable to get or write revision: ", e
|
pass
|
||||||
|
|
||||||
|
|
||||||
# The libtorrent extension
|
# The libtorrent extension
|
||||||
@ -241,3 +249,10 @@ setup(
|
|||||||
deluge = deluge.main:start_ui
|
deluge = deluge.main:start_ui
|
||||||
deluged = deluge.main:start_daemon
|
deluged = deluge.main:start_daemon
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
try:
|
||||||
|
f = open("deluge/data/revision", "w")
|
||||||
|
f.write("")
|
||||||
|
f.close()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user