mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 07:58:38 +00:00
Handle setting the revision in a different way.
This commit is contained in:
parent
0b807e8945
commit
b950d28781
4 changed files with 24 additions and 7 deletions
|
@ -56,7 +56,15 @@ def get_version():
|
||||||
return pkg_resources.require("Deluge")[0].version.split("r")[0]
|
return pkg_resources.require("Deluge")[0].version.split("r")[0]
|
||||||
|
|
||||||
def get_revision():
|
def get_revision():
|
||||||
return pkg_resources.require("Deluge")[0].version.split("r")[1]
|
revision = ""
|
||||||
|
try:
|
||||||
|
f = open(pkg_resources.resource_filename("deluge", os.path.join("data", "revision")))
|
||||||
|
revision = f.read()
|
||||||
|
f.close()
|
||||||
|
except IOError, e:
|
||||||
|
log.debug("Could not open revision file: %s", e)
|
||||||
|
|
||||||
|
return revision
|
||||||
|
|
||||||
def get_config_dir(filename=None):
|
def get_config_dir(filename=None):
|
||||||
""" Returns the config path if no filename is specified
|
""" Returns the config path if no filename is specified
|
||||||
|
|
0
deluge/data/revision
Normal file
0
deluge/data/revision
Normal file
|
@ -50,10 +50,14 @@ class AboutDialog:
|
||||||
"aboutdialog")
|
"aboutdialog")
|
||||||
self.about.set_position(gtk.WIN_POS_CENTER)
|
self.about.set_position(gtk.WIN_POS_CENTER)
|
||||||
self.about.set_name("Deluge")
|
self.about.set_name("Deluge")
|
||||||
try:
|
|
||||||
self.about.set_version(deluge.common.get_version() + "r" + deluge.common.get_revision())
|
# Get the version and revision numbers
|
||||||
except IndexError:
|
rev = deluge.common.get_revision()
|
||||||
self.about.set_version(deluge.common.get_version())
|
version = deluge.common.get_version()
|
||||||
|
if rev != "":
|
||||||
|
version = version + "r" + rev
|
||||||
|
|
||||||
|
self.about.set_version(version)
|
||||||
self.about.set_authors(["Andrew Resch", "Marcos Pinto"])
|
self.about.set_authors(["Andrew Resch", "Marcos Pinto"])
|
||||||
self.about.set_artists(["Andrew Wedderburn", "Andrew Resch"])
|
self.about.set_artists(["Andrew Wedderburn", "Andrew Resch"])
|
||||||
self.about.set_translator_credits(_("translator-credits"))
|
self.about.set_translator_credits(_("translator-credits"))
|
||||||
|
|
9
setup.py
9
setup.py
|
@ -50,11 +50,15 @@ try:
|
||||||
stdout = os.popen("svn info")
|
stdout = os.popen("svn info")
|
||||||
for line in stdout:
|
for line in stdout:
|
||||||
if line.split(" ")[0] == "Revision:":
|
if line.split(" ")[0] == "Revision:":
|
||||||
revision_string = "r%s" % line.split(" ")[1].strip()
|
revision_string = line.split(" ")[1].strip()
|
||||||
break
|
break
|
||||||
|
f = open("deluge/data/revision", "w")
|
||||||
|
f.write(revision_string)
|
||||||
|
f.close()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
# The libtorrent extension
|
# The libtorrent extension
|
||||||
_extra_compile_args = [
|
_extra_compile_args = [
|
||||||
"-Wno-missing-braces",
|
"-Wno-missing-braces",
|
||||||
|
@ -173,7 +177,7 @@ for path in glob.glob('deluge/plugins/*'):
|
||||||
setup(
|
setup(
|
||||||
name = "deluge",
|
name = "deluge",
|
||||||
fullname = "Deluge Bittorent Client",
|
fullname = "Deluge Bittorent Client",
|
||||||
version = "0.6.0.0" + revision_string,
|
version = "0.6.0.0",
|
||||||
author = "Andrew Resch, Marcos Pinto",
|
author = "Andrew Resch, Marcos Pinto",
|
||||||
author_email = "andrewresch@gmail.com, markybob@dipconsultants.com",
|
author_email = "andrewresch@gmail.com, markybob@dipconsultants.com",
|
||||||
description = "GTK+ bittorrent client",
|
description = "GTK+ bittorrent client",
|
||||||
|
@ -183,6 +187,7 @@ setup(
|
||||||
package_data = {"deluge": ["ui/gtkui/glade/*.glade",
|
package_data = {"deluge": ["ui/gtkui/glade/*.glade",
|
||||||
"data/pixmaps/*.png",
|
"data/pixmaps/*.png",
|
||||||
"data/pixmaps/deluge.svg",
|
"data/pixmaps/deluge.svg",
|
||||||
|
"data/revision",
|
||||||
"plugins/*.egg",
|
"plugins/*.egg",
|
||||||
"i18n/*.pot",
|
"i18n/*.pot",
|
||||||
"i18n/*/LC_MESSAGES/*.mo",
|
"i18n/*/LC_MESSAGES/*.mo",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue