head 1.8; access; symbols pkgsrc-2018Q1:1.7.0.12 pkgsrc-2018Q1-base:1.7 pkgsrc-2017Q4:1.7.0.10 pkgsrc-2017Q4-base:1.7 pkgsrc-2017Q3:1.7.0.8 pkgsrc-2017Q3-base:1.7 pkgsrc-2017Q2:1.7.0.4 pkgsrc-2017Q2-base:1.7 pkgsrc-2017Q1:1.7.0.2 pkgsrc-2017Q1-base:1.7 pkgsrc-2016Q4:1.6.0.22 pkgsrc-2016Q4-base:1.6 pkgsrc-2016Q3:1.6.0.20 pkgsrc-2016Q3-base:1.6 pkgsrc-2016Q2:1.6.0.18 pkgsrc-2016Q2-base:1.6 pkgsrc-2016Q1:1.6.0.16 pkgsrc-2016Q1-base:1.6 pkgsrc-2015Q4:1.6.0.14 pkgsrc-2015Q4-base:1.6 pkgsrc-2015Q3:1.6.0.12 pkgsrc-2015Q3-base:1.6 pkgsrc-2015Q2:1.6.0.10 pkgsrc-2015Q2-base:1.6 pkgsrc-2015Q1:1.6.0.8 pkgsrc-2015Q1-base:1.6 pkgsrc-2014Q4:1.6.0.6 pkgsrc-2014Q4-base:1.6 pkgsrc-2014Q3:1.6.0.4 pkgsrc-2014Q3-base:1.6 pkgsrc-2014Q2:1.6.0.2 pkgsrc-2014Q2-base:1.6; locks; strict; comment @# @; 1.8 date 2018.06.17.19.21.21; author adam; state dead; branches; next 1.7; commitid c6D8IR427LvRuFGA; 1.7 date 2017.01.26.09.45.23; author jperkin; state Exp; branches; next 1.6; commitid w9JbO6VFZnutCsDz; 1.6 date 2014.06.01.10.11.29; author wiz; state Exp; branches; next 1.5; commitid R8lw0eUyl8ASWNCx; 1.5 date 2014.05.10.08.11.02; author wiz; state Exp; branches; next 1.4; commitid WhHhNFV4gibtZXzx; 1.4 date 2014.05.10.04.35.55; author obache; state Exp; branches; next 1.3; commitid ZuDJ0iWxZ0BrNWzx; 1.3 date 2014.05.09.16.33.56; author adam; state Exp; branches; next 1.2; commitid zhqFwOvbTrRZNSzx; 1.2 date 2014.05.09.05.59.09; author obache; state Exp; branches; next 1.1; commitid pZaxs08FU1r3iPzx; 1.1 date 2014.05.09.02.27.14; author wen; state Exp; branches; next ; commitid d0cYvuL9ekui7Ozx; desc @@ 1.8 log @python: pkgsrc changes - Fix buidling curses (consistent across platforms) - Fix finding libraries with ctypes.util.find_library - Enable spwd module on Linux - Cleanup @ text @$NetBSD: patch-am,v 1.7 2017/01/26 09:45:23 jperkin Exp $ --- setup.py.orig 2014-03-17 02:31:31.000000000 +0000 +++ setup.py @@@@ -33,7 +33,8 @@@@ host_platform = get_platform() COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) # This global variable is used to hold the list of modules to be disabled. -disabled_module_list = [] +disabled_module_list = ["_curses", "_curses_panel", "_elementtree", +"_sqlite3", "_tkinter", "_gdbm", "pyexpat", "readline", "spwd", "xxlimited"] def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (after any relative @@@@ -441,15 +442,15 @@@@ class PyBuildExt(build_ext): os.unlink(tmpfile) def detect_modules(self): - # Ensure that /usr/local is always used, but the local build - # directories (i.e. '.' and 'Include') must be first. See issue - # 10520. - if not cross_compiling: - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') - # only change this for cross builds for 3.3, issues on Mageia - if cross_compiling: - self.add_gcc_paths() + # Add the buildlink directories for pkgsrc + if os.environ.get('BUILDLINK_DIR'): + dir = os.environ['BUILDLINK_DIR'] + libdir = dir + '/lib' + incdir = dir + '/include' + if libdir not in self.compiler.library_dirs: + self.compiler.library_dirs.insert(0, libdir) + if incdir not in self.compiler.include_dirs: + self.compiler.include_dirs.insert(0, incdir) self.add_multiarch_paths() # Add paths specified in the environment variables LDFLAGS and @@@@ -751,8 +752,7 @@@@ class PyBuildExt(build_ext): depends = ['socketmodule.h']) ) # Detect SSL support for the socket module (via _ssl) search_for_ssl_incs_in = [ - '/usr/local/ssl/include', - '/usr/contrib/ssl/include/' + '@@SSLBASE@@/include' ] ssl_incs = find_file('openssl/ssl.h', inc_dirs, search_for_ssl_incs_in @@@@ -763,9 +763,7 @@@@ class PyBuildExt(build_ext): if krb5_h: ssl_incs += krb5_h ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, - ['/usr/local/ssl/lib', - '/usr/contrib/ssl/lib/' - ] ) + [] ) if (ssl_incs is not None and ssl_libs is not None): @@@@ -784,7 +782,7 @@@@ class PyBuildExt(build_ext): # look for the openssl version header on the compiler search path. opensslv_h = find_file('openssl/opensslv.h', [], - inc_dirs + search_for_ssl_incs_in) + search_for_ssl_incs_in + inc_dirs) if opensslv_h: name = os.path.join(opensslv_h[0], 'openssl/opensslv.h') if host_platform == 'darwin' and is_macosx_sdk_path(name): @@@@ -1148,6 +1146,30 @@@@ class PyBuildExt(build_ext): dbm_order = ['gdbm'] # The standard Unix dbm module: if host_platform not in ['cygwin']: + + ## Top half based on find_file + def find_ndbm_h(dirs): + ret = None + if sys.platform == 'darwin': + sysroot = macosx_sdk_root() + for dir in dirs: + f = os.path.join(dir, 'ndbm.h') + if sys.platform == 'darwin' and is_macosx_sdk_path(dir): + f = os.path.join(sysroot, dir[1:], 'ndbm.h') + if not os.path.exists(f): continue + + ret = 'True' + input = text_file.TextFile(f) + while 1: + line = input.readline() + if not line: break + if re.search('This file is part of GDBM', line): + ret = None + break + input.close() + break + return ret + config_args = [arg.strip("'") for arg in sysconfig.get_config_var("CONFIG_ARGS").split()] dbm_args = [arg for arg in config_args @@@@ -1159,7 +1181,7 @@@@ class PyBuildExt(build_ext): dbmext = None for cand in dbm_order: if cand == "ndbm": - if find_file("ndbm.h", inc_dirs, []) is not None: + if find_ndbm_h(inc_dirs) is not None: # Some systems have -lndbm, others have -lgdbm_compat, # others don't have either if self.compiler.find_library_file(lib_dirs, @@@@ -1956,10 +1986,7 @@@@ class PyBuildExt(build_ext): depends = ['_decimal/docstrings.h'] else: srcdir = sysconfig.get_config_var('srcdir') - include_dirs = [os.path.abspath(os.path.join(srcdir, - 'Modules', - '_decimal', - 'libmpdec'))] + include_dirs = ['Modules/_decimal/libmpdec'] libraries = [] sources = [ '_decimal/_decimal.c', @@@@ -2205,7 +2232,7 @@@@ def main(): # If you change the scripts installed here, you also need to # check the PyBuildScripts command above, and change the links # created by the bininstall target in Makefile.pre.in - scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3", + scripts = ["Tools/scripts/pydoc3", "Tools/scripts/2to3", "Tools/scripts/pyvenv"] ) @ 1.7 log @Remove obsolete bsddb bits carried over from python2. Patch from jcea in joyent/pkgsrc#457. @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.6 2014/06/01 10:11:29 wiz Exp $ @ 1.6 log @Remove incorrect/unnecessary dragonfly patches. Matches ryoon's commit to python33. @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.5 2014/05/10 08:11:02 wiz Exp $ d10 1 a10 1 +disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_elementtree", @ 1.5 log @Fix typo in previous. @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.4 2014/05/10 04:35:55 obache Exp $ a109 15 @@@@ -1487,6 +1509,14 @@@@ class PyBuildExt(build_ext): macros = dict() libraries = [] + elif host_platform.startswith('dragonfly'): + macros = dict( + HAVE_SEM_OPEN=0, + HAVE_SEM_TIMEDWAIT=0, + HAVE_FD_TRANSFER=1, + ) + libraries = [] + else: # Linux and other unices macros = dict() libraries = ['rt'] @ 1.4 log @fixes again, for the case pkgsrc openssl is prefered than builtin old openssl. @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.1 2014/05/09 02:27:14 wen Exp $ d66 1 a66 1 + search_for_ssl_incs_in, + inc_dirs) @ 1.3 log @Fix building on OS X @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.2 2014/05/09 05:59:09 obache Exp $ d61 9 @ 1.2 log @restrict openssl header file search path. @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.1 2014/05/09 02:27:14 wen Exp $ a60 9 @@@@ -784,7 +782,7 @@@@ class PyBuildExt(build_ext): # look for the openssl version header on the compiler search path. opensslv_h = find_file('openssl/opensslv.h', [], - inc_dirs + search_for_ssl_incs_in) + search_for_ssl_incs_in) if opensslv_h: name = os.path.join(opensslv_h[0], 'openssl/opensslv.h') if host_platform == 'darwin' and is_macosx_sdk_path(name): @ 1.1 log @Import python-3.4.0 as lang/python34. Python is an interpreted, interactive, object-oriented programming language that combines remarkable power with very clear syntax. For an introduction to programming in Python you are referred to the Python Tutorial. The Python Library Reference documents built-in and standard types, constants, functions and modules. Finally, the Python Reference Manual describes the syntax and semantics of the core language in (perhaps too) much detail. Python's basic power can be extended with your own modules written in C or C++. On most systems such modules may be dynamically loaded. Python is also adaptable as an exten- sion language for existing applications. See the internal documentation for hints. This package provides Python version 3.4.x. @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.5 2014/03/27 08:50:01 obache Exp $ d3 1 a3 1 --- setup.py.orig 2013-05-15 16:33:00.000000000 +0000 d5 1 a5 1 @@@@ -31,7 +31,8 @@@@ host_platform = get_platform() d15 1 a15 1 @@@@ -435,15 +436,15 @@@@ class PyBuildExt(build_ext): d40 11 a50 1 @@@@ -753,9 +754,7 @@@@ class PyBuildExt(build_ext): d61 10 a70 1 @@@@ -1138,6 +1137,30 @@@@ class PyBuildExt(build_ext): d101 1 a101 1 @@@@ -1149,7 +1172,7 @@@@ class PyBuildExt(build_ext): d110 1 a110 1 @@@@ -1475,6 +1498,14 @@@@ class PyBuildExt(build_ext): d125 1 a125 1 @@@@ -1906,10 +1937,7 @@@@ class PyBuildExt(build_ext): d137 1 a137 1 @@@@ -2155,7 +2183,7 @@@@ def main(): @