58 lines
1.5 KiB
Python
58 lines
1.5 KiB
Python
#!/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)',
|
|
],
|
|
)
|
|
|