pandora_client/setup.py

67 lines
2.0 KiB
Python
Raw Normal View History

2010-11-16 20:22:30 +00:00
#!/usr/bin/env python
# vi:si:et:sw=4:sts=4:ts=4
# encoding: utf-8
2010-12-07 00:22:29 +00:00
try:
from setuptools import setup
except:
from distutils.core import setup
2010-11-16 20:22:30 +00:00
def get_bzr_version():
import os
2013-05-14 10:10:18 +00:00
import re
2015-09-24 10:46:33 +00:00
import subprocess
dot_git = os.path.join(os.path.dirname(__file__), '.git')
2011-10-09 13:03:47 +00:00
info = os.path.join(os.path.dirname(__file__), '.bzr/branch/last-revision')
2013-05-14 10:10:18 +00:00
changelog = os.path.join(os.path.dirname(__file__), 'debian/changelog')
2015-09-24 10:46:33 +00:00
if os.path.exists(dot_git):
cmd = ['git', 'rev-list', 'HEAD', '--count']
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = p.communicate()
rev = int(stdout)
return u'%s' % rev
elif os.path.exists(info):
2011-10-09 13:03:47 +00:00
f = open(info)
rev = int(f.read().split()[0])
f.close()
if rev:
return u'%s' % rev
2013-05-14 10:10:18 +00:00
elif os.path.exists(changelog):
f = open(changelog)
head = f.read().strip().split('\n')[0]
f.close()
rev = re.compile('\d+\.\d+\.(\d+)').findall(head)
if rev:
return u"%s" % rev[0]
return u'unknown'
2010-11-16 20:22:30 +00:00
setup(
name="pandora_client",
2016-08-24 12:18:22 +00:00
version="0.2.%s" % get_bzr_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.",
2010-11-16 20:22:30 +00:00
author="j",
author_email="j@mailb.org",
2012-06-22 10:10:45 +00:00
url="http://wiki.0x2620.org/wiki/pandora_client",
2010-11-16 20:22:30 +00:00
license="GPLv3",
2016-08-24 12:18:22 +00:00
scripts=[
2010-11-16 20:22:30 +00:00
'bin/pandora_client',
],
packages=[
'pandora_client'
],
install_requires=[
'ox >= 2.1.541,<3',
2016-08-23 08:55:24 +00:00
'six',
'requests >= 1.1.0',
'zeroconf',
'netifaces',
],
2016-08-24 12:18:22 +00:00
keywords=[],
classifiers=[
2017-11-26 11:51:29 +00:00
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
2016-08-24 12:18:22 +00:00
'Operating System :: OS Independent',
2017-11-26 11:51:29 +00:00
'Programming Language :: Python :: 3',
2016-08-24 12:18:22 +00:00
'License :: OSI Approved :: GNU General Public License (GPL)',
2010-11-16 20:22:30 +00:00
],
)