Do not use scripts=[] to install powerline at all.

This commit is contained in:
ZyX 2013-11-22 20:23:56 +04:00 committed by ZyX
parent 75536825ba
commit 21ee641a02
1 changed files with 20 additions and 6 deletions

View File

@ -14,7 +14,6 @@ except IOError:
README = ''
OLD_PYTHON = sys.version_info < (2, 7)
PYTHON_3 = sys.version_info > (2,)
def compile_client():
@ -44,16 +43,31 @@ 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.
# XXX 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.
#
# XXX Python 2 fucks up script contents*. Not using it to install scripts
# any longer.
# * Consider the following input:
# % alias hex1=$'hexdump -e \'"" 1/1 "%02X\n"\''
# % diff <(hex1 ./scripts/powerline) <(hex1 ~/.local/bin/powerline)
# This will show output like
# 375c375
# < 0D
# ---
# > 0A
# (repeated, with diff segment header numbers growing up).
#
# FIXME Current solution does not work with `pip install -e`. Still better
# then solution that is not working at all.
scripts=[
'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),
],
data_files=[('bin', ['scripts/powerline'])],
keywords='',
packages=find_packages(exclude=('tests', 'tests.*')),
include_package_data=True,