remove bzr reference
This commit is contained in:
parent
007a1087ae
commit
d9d8e009ba
1 changed files with 5 additions and 10 deletions
15
setup.py
15
setup.py
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# vi:si:et:sw=4:sts=4:ts=4
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
try:
|
try:
|
||||||
|
@ -6,12 +6,12 @@ try:
|
||||||
except:
|
except:
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
def get_bzr_version():
|
|
||||||
|
def get_version():
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
dot_git = os.path.join(os.path.dirname(__file__), '.git')
|
dot_git = os.path.join(os.path.dirname(__file__), '.git')
|
||||||
info = os.path.join(os.path.dirname(__file__), '.bzr/branch/last-revision')
|
|
||||||
changelog = os.path.join(os.path.dirname(__file__), 'debian/changelog')
|
changelog = os.path.join(os.path.dirname(__file__), 'debian/changelog')
|
||||||
if os.path.exists(dot_git):
|
if os.path.exists(dot_git):
|
||||||
cmd = ['git', 'rev-list', 'HEAD', '--count']
|
cmd = ['git', 'rev-list', 'HEAD', '--count']
|
||||||
|
@ -19,12 +19,6 @@ def get_bzr_version():
|
||||||
stdout, stderr = p.communicate()
|
stdout, stderr = p.communicate()
|
||||||
rev = int(stdout)
|
rev = int(stdout)
|
||||||
return u'%s' % rev
|
return u'%s' % rev
|
||||||
elif os.path.exists(info):
|
|
||||||
f = open(info)
|
|
||||||
rev = int(f.read().split()[0])
|
|
||||||
f.close()
|
|
||||||
if rev:
|
|
||||||
return u'%s' % rev
|
|
||||||
elif os.path.exists(changelog):
|
elif os.path.exists(changelog):
|
||||||
f = open(changelog)
|
f = open(changelog)
|
||||||
head = f.read().strip().split('\n')[0]
|
head = f.read().strip().split('\n')[0]
|
||||||
|
@ -34,9 +28,10 @@ def get_bzr_version():
|
||||||
return u"%s" % rev[0]
|
return u"%s" % rev[0]
|
||||||
return u'unknown'
|
return u'unknown'
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pandora_client",
|
name="pandora_client",
|
||||||
version="0.2.%s" % get_bzr_version(),
|
version="0.2.%s" % get_version(),
|
||||||
description="pandora_client is a commandline client for pan.do/ra. You can use it to import videos into a pan.do/ra system. It is currently known to work on Linux and Mac OS X.",
|
description="pandora_client is a commandline client for pan.do/ra. You can use it to import videos into a pan.do/ra system. It is currently known to work on Linux and Mac OS X.",
|
||||||
author="j",
|
author="j",
|
||||||
author_email="j@mailb.org",
|
author_email="j@mailb.org",
|
||||||
|
|
Loading…
Reference in a new issue