+1, want to submit a pull request?

On Tue, Jun 7, 2016 at 11:28 PM, Abdeali Kothari
<abdealikoth...@gmail.com> wrote:
> Hi,
>
> Currently, when a user installs cython, if the Python headers are not found,
> an error message saying "Python.h: no such file or directory" is shown
> (Example: https://justpaste.it/v0gz). Would it be possible to suggest an
> action to install the headers ?
>
> I found http://trac.cython.org/ticket/247 which is quite old, and makes the
> error message easier to find, but doesn't recommend a solution.
>
> `sys.platform`, `platform.linux_distribution` or `distro`[1] can be used to
> find which OS, platform, etc is and use that to suggest a command like:
>
>     if sys.version_info < (3, ) and sys.platform.startswith("linux") and
> platform.linux_distribution()[0] in ("ubuntu", "debian"):
>         print("Python headers were not found. On Debian/Ubuntu, `sudo
> apt-get install python-dev` should install the Python headers.")
>
>     elif sys.version_info < (3, ) and sys.platform.startswith("linux") and
> platform.linux_distribution()[0] in ("ubuntu", "debian"):
>         print("Python headers were not found. On Debian/Ubuntu, `sudo
> apt-get install python3-dev` should install the Python3 headers.")
>
> This would help so that non-developers can use cython based packages easily
> as it provides helpful instructions on what to do. Currently, you
> essentially search for the error message and go to one of the forums/blogs
> explaining what can be done.
>
> Or maybe by default it can just point the user to an Installation Page which
> explains in detail what needs to be done to get those headers for various
> systems ?
>
> [1] - https://pypi.python.org/pypi/distro
>
> _______________________________________________
> cython-devel mailing list
> cython-devel@python.org
> https://mail.python.org/mailman/listinfo/cython-devel
>
_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel

Reply via email to