add setup.py

This commit is contained in:
j 2012-09-08 20:49:36 +02:00
parent 0fea573dee
commit 3e0078dcc8
4 changed files with 67 additions and 2 deletions

3
.bzrignore Normal file
View File

@ -0,0 +1,3 @@
MANIFEST
build
dist

View File

@ -1,3 +1,8 @@
on os x run: ./bin/0xcd
run ./bin/0xcd -h for a list of options
0xCD - Remote access for your music library
start it with:
./bin/0xCD
currently iTunes and Rhythmbox are supported,
if you use another player please send a patch.

View File

57
setup.py Normal file
View File

@ -0,0 +1,57 @@
#!/usr/bin/env python
# vi:si:et:sw=4:sts=4:ts=4
# encoding: utf-8
import os
from distutils.core import setup
def get_bzr_version():
import os
info = os.path.join(os.path.dirname(__file__), '.bzr/branch/last-revision')
if os.path.exists(info):
f = open(info)
rev = int(f.read().split()[0])
f.close()
if rev:
return u'%s' % rev
return u'unknown'
def static_files():
static = []
for root, directories, files in os.walk('oxcd/static', followlinks=True):
for f in files:
f = os.path.join(root, f)[len('oxcd/'):]
if not '.bzr' in f \
and not (f.endswith('.js.gz') or f.endswith('.json.gz')) \
and ('oxjs/build' in f or not 'oxjs' in f):
static.append(f)
return static
setup(
name="0xcd",
version="0.%s" % get_bzr_version() ,
description='''0xCD - Remote access for your music library''',
author="0x2620",
author_email="0x2620@0x2620.org",
url="http://0xCD.org",
download_url="https://code.0x2620.org/oxcd/download",
license="GPLv3",
scripts=[
'bin/0xcd'
],
packages=[
'oxcd'
],
package_data={'oxcd': static_files()},
zip_safe=False,
install_requires=['ox'],
keywords=[
],
classifiers=[
'Operating System :: OS Independent',
'Programming Language :: Python',
'License :: OSI Approved :: GNU General Public License (GPL)',
],
)