fix packaging
This commit is contained in:
parent
47182a28d6
commit
3557134ab2
1 changed files with 15 additions and 8 deletions
23
setup.py
23
setup.py
|
@ -1,13 +1,10 @@
|
|||
# setup.py
|
||||
# -*- coding: UTF-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
try:
|
||||
from setuptools import setup
|
||||
except:
|
||||
from distutils.core import setup
|
||||
from distutils.core import setup
|
||||
import os
|
||||
|
||||
def get_version():
|
||||
import os
|
||||
from pandoralocal.version import __version__
|
||||
info = os.path.join(os.path.dirname(__file__), '.bzr/branch/last-revision')
|
||||
if os.path.exists(info):
|
||||
|
@ -15,9 +12,16 @@ def get_version():
|
|||
rev = int(f.read().split()[0])
|
||||
f.close()
|
||||
if rev:
|
||||
return u'%s.%s' % (__version__, rev)
|
||||
return '%s.%s' % (__version__, rev)
|
||||
return '%s'%__version__
|
||||
|
||||
def get_package_data():
|
||||
package_data = []
|
||||
for root, folders, files in os.walk('pandoralocal/static'):
|
||||
for f in files:
|
||||
package_data.append(os.path.join(root, f)[len('pandoralocal/'):])
|
||||
return package_data
|
||||
|
||||
setup(name="pandoralocal",
|
||||
version=get_version() ,
|
||||
scripts=[
|
||||
|
@ -26,11 +30,14 @@ setup(name="pandoralocal",
|
|||
packages=[
|
||||
'pandoralocal',
|
||||
],
|
||||
package_data = {
|
||||
'pandoralocal': get_package_data(),
|
||||
},
|
||||
author="0x2620",
|
||||
author_email="0x2620@0x2620.org",
|
||||
description="pandoralocal allows users to use local videos on a pan.do/ra site",
|
||||
description=u"pandoralocal allows users to use local videos on a pan.do/ra site",
|
||||
classifiers = [
|
||||
'Development Status :: 1 - Development/Unstable',
|
||||
'Development Status :: 4 - Beta',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python',
|
||||
],
|
||||
|
|
Loading…
Add table
Reference in a new issue