fix packaging
This commit is contained in:
parent
47182a28d6
commit
3557134ab2
23
setup.py
23
setup.py
|
@ -1,13 +1,10 @@
|
||||||
# setup.py
|
# setup.py
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
# vi:si:et:sw=4:sts=4:ts=4
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
try:
|
from distutils.core import setup
|
||||||
from setuptools import setup
|
import os
|
||||||
except:
|
|
||||||
from distutils.core import setup
|
|
||||||
|
|
||||||
def get_version():
|
def get_version():
|
||||||
import os
|
|
||||||
from pandoralocal.version import __version__
|
from pandoralocal.version import __version__
|
||||||
info = os.path.join(os.path.dirname(__file__), '.bzr/branch/last-revision')
|
info = os.path.join(os.path.dirname(__file__), '.bzr/branch/last-revision')
|
||||||
if os.path.exists(info):
|
if os.path.exists(info):
|
||||||
|
@ -15,9 +12,16 @@ def get_version():
|
||||||
rev = int(f.read().split()[0])
|
rev = int(f.read().split()[0])
|
||||||
f.close()
|
f.close()
|
||||||
if rev:
|
if rev:
|
||||||
return u'%s.%s' % (__version__, rev)
|
return '%s.%s' % (__version__, rev)
|
||||||
return '%s'%__version__
|
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",
|
setup(name="pandoralocal",
|
||||||
version=get_version() ,
|
version=get_version() ,
|
||||||
scripts=[
|
scripts=[
|
||||||
|
@ -26,11 +30,14 @@ setup(name="pandoralocal",
|
||||||
packages=[
|
packages=[
|
||||||
'pandoralocal',
|
'pandoralocal',
|
||||||
],
|
],
|
||||||
|
package_data = {
|
||||||
|
'pandoralocal': get_package_data(),
|
||||||
|
},
|
||||||
author="0x2620",
|
author="0x2620",
|
||||||
author_email="0x2620@0x2620.org",
|
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 = [
|
classifiers = [
|
||||||
'Development Status :: 1 - Development/Unstable',
|
'Development Status :: 4 - Beta',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue