diff options
author | nros <nros@pkgsrc.org> | 2021-12-26 19:57:05 +0000 |
---|---|---|
committer | nros <nros@pkgsrc.org> | 2021-12-26 19:57:05 +0000 |
commit | 6abaa423d67b6875698f6f57f47e6e10a2e13845 (patch) | |
tree | 5d571d50d0ab333b421deadf9edc037fb5469ad0 | |
parent | c0cdf22befb303e900113eabf66611271945ed1d (diff) | |
download | pkgsrc-6abaa423d67b6875698f6f57f47e6e10a2e13845.tar.gz |
Fix py-curses with python 3.10 .
The fix has been tested with
python versions 2.7 3.6 3.9
and 3.10 .
-rw-r--r-- | devel/py-curses/Makefile | 4 | ||||
-rw-r--r-- | devel/py-curses/files/setup.py | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/devel/py-curses/Makefile b/devel/py-curses/Makefile index 869e38fb17a..c289d1291d7 100644 --- a/devel/py-curses/Makefile +++ b/devel/py-curses/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.52 2021/12/06 16:03:50 wiz Exp $ +# $NetBSD: Makefile,v 1.53 2021/12/26 19:57:05 nros Exp $ PKGNAME= ${PYPKGPREFIX}-curses-${PY_DISTVERSION} PKGREVISION= 6 @@ -11,8 +11,6 @@ COMMENT= Curses module for Python PYDISTUTILSPKG= yes PY_PATCHPLIST= yes -#CPPFLAGS+= -I${PREFIX}/include/python3.10/internal - # NetBSD-8 curses has enough support for py-curses USE_CURSES= getsyx # But we build as ncurses still to get the full feature set easily diff --git a/devel/py-curses/files/setup.py b/devel/py-curses/files/setup.py index d9959ee9321..f094a2e4d76 100644 --- a/devel/py-curses/files/setup.py +++ b/devel/py-curses/files/setup.py @@ -1,19 +1,22 @@ -# $NetBSD: setup.py,v 1.1 2002/01/28 09:32:55 drochner Exp $ +# $NetBSD: setup.py,v 1.2 2021/12/26 19:57:05 nros Exp $ import distutils +import os from distutils.core import setup, Extension +from distutils.sysconfig import get_python_inc ncursesprefix = '@NCURSESPREFIX@' ncincl = ncursesprefix + '/include' nclib = ncursesprefix + '/lib' +py_inc_int = os.path.join(get_python_inc(), 'internal') setup( ext_modules = [ Extension( '_curses', ['Modules/_cursesmodule.c'], - define_macros=[('HAVE_NCURSES_H', None)], - include_dirs=[ncincl], + define_macros=[('HAVE_NCURSES_H', None), ('Py_BUILD_CORE_MODULE', None)], + include_dirs=[ncincl, py_inc_int], library_dirs=[nclib], runtime_library_dirs=[nclib], libraries=['ncurses'] |