Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.py: Use gnureadline for all other OS #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -11,19 +11,21 @@
import os
import sys
from setuptools import setup

from distutils import sysconfig

long_description = """anyreadline tries to do the right thing and installs either
readline on MacOSX or pyreadline or Windows.
Or does nothing on Linux which comes in general with readline built-in"""
pyreadline for Windows or gnureadline for other platforms if the stdlib version
wasn't built in."""

sysplat = str(sys.platform).lower()
have_libreadline = sysconfig.get_config_var('HAVE_LIBREADLINE')

install_requires = ['setuptools']
if 'darwin' in sysplat:
install_requires += ['gnureadline']
if 'win32' in sysplat:
install_requires += ['pyreadline']
if not have_libreadline:
install_requires = ['setuptools']
if 'win32' in sysplat:
install_requires += ['pyreadline']
else:
install_requires += ['gnureadline']

setup(
name = name,