2017-11-26 12:01:15 +00:00
#!/usr/bin/env python3
2017-11-26 12:25:05 +00:00
from setuptools import setup
2010-11-16 20:22:30 +00:00
2017-11-26 12:01:15 +00:00
def get_version ( ) :
2010-11-18 14:34:34 +00:00
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 ' )
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 ( )
2017-11-26 12:25:05 +00:00
rev = int ( stdout ) - 267
2015-09-24 10:46:33 +00:00
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 ]
2010-11-18 14:34:34 +00:00
return u ' unknown '
2017-11-26 12:01:15 +00:00
2010-11-16 20:22:30 +00:00
setup (
name = " pandora_client " ,
2017-11-26 12:25:05 +00:00
version = " 0.3. %s " % get_version ( ) ,
2016-08-24 12:16:19 +00:00
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 " ,
2020-05-30 01:46:52 +00:00
url = " https://code.0x2620.org/0x2620/pandora_client/wiki " ,
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 '
] ,
2013-04-24 13:21:21 +00:00
install_requires = [
2017-11-26 12:25:05 +00:00
' ox >= 2.3.804,<3 ' ,
2016-08-23 08:55:24 +00:00
' six ' ,
2017-06-30 16:26:20 +00:00
' requests >= 1.1.0 ' ,
' zeroconf ' ,
' netifaces ' ,
2013-04-24 13:21:21 +00:00
] ,
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
] ,
)