Use data_files on python-3
This commit is contained in:
parent
a122e73b9b
commit
c1d290b570
14
setup.py
14
setup.py
|
@ -14,6 +14,7 @@ except IOError:
|
|||
README = ''
|
||||
|
||||
OLD_PYTHON = sys.version_info < (2, 7)
|
||||
PYTHON_3 = sys.version_info > (2,)
|
||||
|
||||
|
||||
def compile_client():
|
||||
|
@ -21,12 +22,6 @@ def compile_client():
|
|||
|
||||
if hasattr(sys, 'getwindowsversion'):
|
||||
raise NotImplementedError()
|
||||
if sys.version_info >= (3, 0):
|
||||
# FIXME Python 3 doesn't allow compiled C files to be included in the
|
||||
# scripts list below. This is because Python 3 distutils tries to
|
||||
# decode the file to ASCII, and fails when powerline-client is
|
||||
# a binary.
|
||||
raise NotImplementedError()
|
||||
else:
|
||||
from distutils.ccompiler import new_compiler
|
||||
compiler = new_compiler().compiler
|
||||
|
@ -49,13 +44,16 @@ setup(
|
|||
author='Kim Silkebaekken',
|
||||
author_email='kim.silkebaekken+vim@gmail.com',
|
||||
url='https://github.com/Lokaltog/powerline',
|
||||
# FIXME Python 3 doesn't allow compiled C files to be included in the
|
||||
# scripts list below. This is because Python 3 distutils tries to decode the
|
||||
# file to ASCII, and fails when powerline-client is a binary.
|
||||
scripts=[
|
||||
'scripts/powerline',
|
||||
'scripts/powerline-lint',
|
||||
'scripts/powerline-daemon',
|
||||
'scripts/powerline-render',
|
||||
'scripts/powerline-config',
|
||||
],
|
||||
] + ([] if PYTHON_3 else ['scripts/powerline']),
|
||||
data_files=([('bin', ['scripts/powerline'])] if PYTHON_3 else None),
|
||||
keywords='',
|
||||
packages=find_packages(exclude=('tests', 'tests.*')),
|
||||
include_package_data=True,
|
||||
|
|
Loading…
Reference in New Issue