mirror of
https://github.com/powerline/powerline.git
synced 2025-07-25 06:46:33 +02:00
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 = ''
|
README = ''
|
||||||
|
|
||||||
OLD_PYTHON = sys.version_info < (2, 7)
|
OLD_PYTHON = sys.version_info < (2, 7)
|
||||||
|
PYTHON_3 = sys.version_info > (2,)
|
||||||
|
|
||||||
|
|
||||||
def compile_client():
|
def compile_client():
|
||||||
@ -21,12 +22,6 @@ def compile_client():
|
|||||||
|
|
||||||
if hasattr(sys, 'getwindowsversion'):
|
if hasattr(sys, 'getwindowsversion'):
|
||||||
raise NotImplementedError()
|
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:
|
else:
|
||||||
from distutils.ccompiler import new_compiler
|
from distutils.ccompiler import new_compiler
|
||||||
compiler = new_compiler().compiler
|
compiler = new_compiler().compiler
|
||||||
@ -49,13 +44,16 @@ setup(
|
|||||||
author='Kim Silkebaekken',
|
author='Kim Silkebaekken',
|
||||||
author_email='kim.silkebaekken+vim@gmail.com',
|
author_email='kim.silkebaekken+vim@gmail.com',
|
||||||
url='https://github.com/Lokaltog/powerline',
|
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=[
|
||||||
'scripts/powerline',
|
|
||||||
'scripts/powerline-lint',
|
'scripts/powerline-lint',
|
||||||
'scripts/powerline-daemon',
|
'scripts/powerline-daemon',
|
||||||
'scripts/powerline-render',
|
'scripts/powerline-render',
|
||||||
'scripts/powerline-config',
|
'scripts/powerline-config',
|
||||||
],
|
] + ([] if PYTHON_3 else ['scripts/powerline']),
|
||||||
|
data_files=([('bin', ['scripts/powerline'])] if PYTHON_3 else None),
|
||||||
keywords='',
|
keywords='',
|
||||||
packages=find_packages(exclude=('tests', 'tests.*')),
|
packages=find_packages(exclude=('tests', 'tests.*')),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user