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

Verify the readline stdlib module was compiled into Python #1

Open
jayvdb opened this issue May 27, 2018 · 4 comments
Open

Verify the readline stdlib module was compiled into Python #1

jayvdb opened this issue May 27, 2018 · 4 comments

Comments

@jayvdb
Copy link
Collaborator

jayvdb commented May 27, 2018

It is possible for the stdlib module readline to be missing if the GNU readline headers were not available with Python's 'configure' was run.

Thus this setup.py should fail a custom package is not being used and the stdlib module is not available.

@jayvdb jayvdb mentioned this issue May 27, 2018
@pombredanne
Copy link
Owner

@jayvdb Hey... do you want me to add you as co-owner on this repo?

@jayvdb
Copy link
Collaborator Author

jayvdb commented Jun 22, 2018

@pombredanne , collaborator will likely be helpful. co-owner/pypi access not so helpful.

There is only a little bit to be done. I think the coala team can the patches in, and then we just need to do one release.

The goal is to remove the environment marker from
https://gitlab.com/coala/coala-utils/blob/master/requirements.txt , and not add more logic there.
Here seems like a more sensible location, as it already has some stuff in setup.py, and just needs it in the new wheel system.
cc @yzgyyang

@jayvdb
Copy link
Collaborator Author

jayvdb commented Jul 16, 2018

While a 'configure' time failure would be good, it is probably not possible to combine this with #2 .

Another approach is to have an anyreadline module which provides a readline name which is the module for each system.

e.g.

from anyreadline import readline

Then that module can also include code to check that readline was compiled into Python on Linux, and give a sensible error if it is missing.

yzgyyang added a commit to yzgyyang/anyreadline that referenced this issue Jul 17, 2018
This fails the installation when readline is not built-in and no custom
packages will be installed.

Closes pombredanne#1
yzgyyang added a commit to yzgyyang/anyreadline that referenced this issue Jul 17, 2018
This fails the installation when readline is not built-in and no custom
packages will be installed.

Closes pombredanne#1
@jayvdb
Copy link
Collaborator Author

jayvdb commented Jul 18, 2018

According to ludwigschwardt/python-gnureadline#52 , gnureadline may be a usable alternative on Linux and BSDs (and others) if the stdlib version wasnt built in.

So I believe we could (and should) add gnureadline as a dependency during setup.py, if the stdlib version wasnt built in.

Again, that isnt possible for a wheel to detect. As this is a very thin package, and we can do wheels for win32 and darwin, it is acceptable for this package to not have wheels for platforms where the "right" readline approach isnt known.

Another way to tackle this problem is to fix pyenv (and similar) to check if the OS readline lib & headers were installed and offer substitute headers before building a broken Python ;-)

yzgyyang added a commit to yzgyyang/anyreadline that referenced this issue Jul 19, 2018
This fails the installation when readline is not built-in and no custom
packages will be installed.

Closes pombredanne#1
yzgyyang added a commit to yzgyyang/anyreadline that referenced this issue Jul 24, 2018
This fails the installation when readline is not built-in and no custom
packages will be installed.

Closes pombredanne#1
yzgyyang added a commit to yzgyyang/anyreadline that referenced this issue Jul 24, 2018
This fails the installation when readline is not built-in and no custom
packages will be installed.

Closes pombredanne#1
yzgyyang added a commit to yzgyyang/anyreadline that referenced this issue Jul 24, 2018
This adds detection for if the readline library is built in, and use
gnureadline if that is not the case and not on Windows.

Since gnureadline links against a static internal version of the
readline library, it could be used for systems where readline support
is not built in (except on Windows where we have pyreadline).

Closes pombredanne#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants