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

bpo-13501: allow choosing between readline and libedit #24189

Merged
merged 1 commit into from Feb 9, 2021

Conversation

@rohieb
Copy link
Contributor

@rohieb rohieb commented Jan 10, 2021

In contrast to macOS, libedit is available as its own include file and library on Linux systems to prevent file name clashes. So if both libraries are available on the system, readline is currently chosen by default; and if only libedit is available, it is not found at all. This patch adds a way to link against libedit by adding the following arguments to configure:

  --with-readline           link against libreadline (the default)
  --with-readline=editline  link against libeditline
  --with-readline=no        disable building the readline module
  --without-readline        (same)

This PR also updates and replaces GH-12076.

https://bugs.python.org/issue13501

@the-knights-who-say-ni
Copy link

@the-knights-who-say-ni the-knights-who-say-ni commented Jan 10, 2021

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@rohieb

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

In contrast to macOS, libedit is available as its own include file and
library on Linux systems to prevent file name clashes. So if both
libraries are available on the system, readline is currently chosen by
default; and if only libedit is available, it is not found at all. This
patch adds a way to link against libedit by adding the following
arguments to configure:

  --with-readline           link against libreadline (the default)
  --with-readline=editline  link against libeditline
  --with-readline=no        disable building the readline module
  --without-readline        (same)

The runtime detection of libedit vs. readline was already done in commit
7105319 (2019-12-04, serge-sans-paille: "bpo-38634: Allow
non-apple build to cope with libedit (GH-16986)").

Fixes: GH-12076 ("bpo-13501 Build or disable readline with Editline")
Fixes: bpo-13501 ("Make libedit support more generic; port readline / libedit to FreeBSD")
Co-authored-by: Enji Cooper (ngie-eign)
Co-authored-by: Martin Panter (vadmium)
Co-authored-by: Robert Marshall (kellinm)
@rohieb
Copy link
Contributor Author

@rohieb rohieb commented Jan 28, 2021

Rebased to current master. Is there anything left for me to do here before this can be merged?

@rohieb rohieb force-pushed the rohieb:readline-libedit-for-3.10 branch from 0d2c4e3 to 394d3a7 Jan 28, 2021
@zware zware requested a review from gpshead Feb 1, 2021
@gpshead gpshead self-assigned this Feb 9, 2021
@gpshead
gpshead approved these changes Feb 9, 2021
@gpshead gpshead merged commit e1f7769 into python:master Feb 9, 2021
11 checks passed
11 checks passed
Docs
Details
Check for source changes
Details
Check if generated files are up to date
Details
Windows (x86)
Details
Windows (x64)
Details
macOS
Details
Ubuntu
Details
Azure Pipelines PR #20210128.27 succeeded
Details
Travis CI - Pull Request Build Passed
Details
bedevere/issue-number Issue number 13501 found
Details
bedevere/news News entry found in Misc/NEWS.d
@gpshead
Copy link
Member

@gpshead gpshead commented Feb 9, 2021

Thanks for tackling this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants