Index: branches/2016Q1/lang/python27/Makefile =================================================================== --- branches/2016Q1/lang/python27/Makefile (revision 405608) +++ branches/2016Q1/lang/python27/Makefile (revision 405609) @@ -1,130 +1,131 @@ # $FreeBSD$ PORTNAME= python27 PORTVERSION= ${PYTHON_PORTVERSION} +PORTREVISION= 1 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON/ftp/python/${PORTVERSION} DISTNAME= Python-${PORTVERSION} DIST_SUBDIR= python MAINTAINER= python@FreeBSD.org COMMENT= Interpreted object-oriented programming language LICENSE= PSFL USES= cpe ncurses pkgconfig readline tar:xz USE_LDCONFIG= yes USE_OPENSSL= yes GNU_CONFIGURE= yes CPE_VENDOR= python CPE_PRODUCT= ${CPE_VENDOR} CPE_VERSION= ${PORTVERSION} CONFIGURE_ARGS+= --enable-shared CONFIGURE_ENV+= ac_cv_opt_olimit_ok=no OPT="" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files TEST_TARGET= buildbottest TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER} MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library MAKE_ARGS+= LIBPC="${PREFIX}/libdata/pkgconfig" # Until pathfix gets support for files other than Makefile.in MAKE_JOBS_UNSAFE= yes # Parser/pgen build bug. See Issue: 200622, 201974 PLIST_SUB= ABI=${ABIFLAGS} \ PORTVERSION=${PORTVERSION} \ OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. http://bugs.python.org/issue19554 OPTIONS_DEFINE= DEBUG IPV6 LIBFFI NLS PYMALLOC SEM THREADS OPTIONS_DEFAULT= IPV6 LIBFFI NLS PYMALLOC SEM THREADS UCS4 OPTIONS_SINGLE= UNICODE OPTIONS_SINGLE_UNICODE= UCS2 UCS4 OPTIONS_SUB= yes LIBFFI_DESC= Use libffi from ports instead of bundled version NLS_DESC= Enable gettext support for the locale module UCS2_DESC= Enable UCS2 Unicode Strings UCS4_DESC= Enable UCS4 Unicode Strings PYMALLOC_DESC= Enable specialized mallocs DEBUG_CONFIGURE_WITH= pydebug IPV6_CONFIGURE_ENABLE= ipv6 LIBFFI_CONFIGURE_ON= --with-system-ffi LIBFFI_LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 # Upstream Issue: http://bugs.python.org/issue6299 NLS_USES= gettext NLS_CPPFLAGS= -I${LOCALBASE}/include NLS_LIBS= -L${LOCALBASE}/lib -lintl NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no PYMALLOC_CONFIGURE_WITH= pymalloc SEM_CONFIGURE_ENV= ac_cv_posix_semaphores_enabled=yes SEM_CONFIGURE_ENV_OFF= ac_cv_posix_semaphores_enabled=no THREADS_CONFIGURE_WITH= threads THREADS_LDFLAGS= -lpthread UCS2_CONFIGURE_ON= --enable-unicode=ucs2 UCS4_CONFIGURE_ON= --enable-unicode=ucs4 .include "${.CURDIR}/Makefile.version" .include # http://bugs.python.org/issue22521 # http://bugs.python.org/issue23042 .if !${PORT_OPTIONS:MLIBFFI} && ${ARCH} == i386 BROKEN= You must use libffi from ports on i386. Enable the LIBFFI option .endif .if ${ARCH} == i386 PLIST_SUB+= X86_ONLY="" .else PLIST_SUB+= X86_ONLY="@comment " .endif .if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == ia64 || ${ARCH} == sparc64 || ${ARCH} == powerpc64 || ${ARCH} == mips64 PLIST_SUB+= 32BIT_ONLY="@comment " .else PLIST_SUB+= 32BIT_ONLY="" .endif .if ${ARCH} == powerpc64 MAKE_ENV+= UNAME_m="powerpc64" .endif .if ${ARCH} == sparc64 CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900 .endif # See http://bugs.freebsd.org/115940 and http://bugs.freebsd.org/193650 .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) PLIST_SUB+= NO_NIS="@comment " .else PLIST_SUB+= NO_NIS="" .endif post-patch: @${REINPLACE_CMD} -e \ 's,/usr/doc/python-docs-,${PREFIX}/share/doc/python,g' \ ${PATCH_WRKSRC}/Lib/pydoc.py .if ${PORT_OPTIONS:MSEM} @# do not use SEM_EXTRA_PATCHES here, since patch-setup.py overlaps with this one @cd ${WRKSRC} && ${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-setup.py .endif .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) @${REINPLACE_CMD} -e 's/disabled_module_list =[^]]*/&, "nis"/' \ ${WRKSRC}/setup.py .endif post-install: for i in ${STAGEDIR}${PREFIX}/lib/python2.7/lib-dynload/*.so; do \ ${STRIP_CMD} $$i; done # Strip shared extensions .include Index: branches/2016Q1/lang/python27/files/patch-Lib_distutils_command_install__lib.py =================================================================== --- branches/2016Q1/lang/python27/files/patch-Lib_distutils_command_install__lib.py (nonexistent) +++ branches/2016Q1/lang/python27/files/patch-Lib_distutils_command_install__lib.py (revision 405609) @@ -0,0 +1,34 @@ +From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001 +From: Brendan Molloy +Date: Mon, 4 Jan 2016 23:14:06 +1100 +Subject: [PATCH] Check bytecode file actually exists and tests + +Should solve issue 20397, where using the --record argument results +in files that failed to generate bytecode files are added to the +record file nonetheless. +--- + Lib/distutils/command/install_lib.py | 17 +++++++++++++---- + Lib/distutils/tests/test_install_lib.py | 8 ++++++-- + 2 files changed, 19 insertions(+), 6 deletions(-) + +--- Lib/distutils/command/install_lib.py.orig 2015-12-05 19:46:56 UTC ++++ Lib/distutils/command/install_lib.py +@@ -168,10 +168,14 @@ class install_lib(Command): + ext = os.path.splitext(os.path.normcase(py_file))[1] + if ext != PYTHON_SOURCE_EXTENSION: + continue +- if self.compile: +- bytecode_files.append(py_file + "c") +- if self.optimize > 0: +- bytecode_files.append(py_file + "o") ++ ++ pyc_file = py_file + "c" ++ if self.compile and os.path.isfile(pyc_file): ++ bytecode_files.append(pyc_file) ++ ++ pyo_file = py_file + "o" ++ if self.optimize > 0 and os.path.isfile(pyo_file): ++ bytecode_files.append(pyo_file) + + return bytecode_files + Property changes on: branches/2016Q1/lang/python27/files/patch-Lib_distutils_command_install__lib.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2016Q1/lang/python27/files/patch-Lib_distutils_tests_test__install__lib.py =================================================================== --- branches/2016Q1/lang/python27/files/patch-Lib_distutils_tests_test__install__lib.py (nonexistent) +++ branches/2016Q1/lang/python27/files/patch-Lib_distutils_tests_test__install__lib.py (revision 405609) @@ -0,0 +1,30 @@ +From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001 +From: Brendan Molloy +Date: Mon, 4 Jan 2016 23:14:06 +1100 +Subject: [PATCH] Check bytecode file actually exists and tests + +Should solve issue 20397, where using the --record argument results +in files that failed to generate bytecode files are added to the +record file nonetheless. +--- + Lib/distutils/command/install_lib.py | 17 +++++++++++++---- + Lib/distutils/tests/test_install_lib.py | 8 ++++++-- + 2 files changed, 19 insertions(+), 6 deletions(-) + +--- Lib/distutils/tests/test_install_lib.py.orig 2015-12-05 19:46:57 UTC ++++ Lib/distutils/tests/test_install_lib.py +@@ -64,8 +64,12 @@ class InstallLibTestCase(support.Tempdir + cmd.distribution.packages = [pkg_dir] + cmd.distribution.script_name = 'setup.py' + +- # get_output should return 4 elements +- self.assertGreaterEqual(len(cmd.get_outputs()), 2) ++ # Create rubbish, uncompilable file ++ f = os.path.join(pkg_dir, 'rubbish.py') ++ self.write_file(f, 'rubbish()') ++ ++ # get_output should return 3 elements ++ self.assertEqual(len(cmd.get_outputs()), 3) + + def test_get_inputs(self): + pkg_dir, dist = self.create_dist() Property changes on: branches/2016Q1/lang/python27/files/patch-Lib_distutils_tests_test__install__lib.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2016Q1/lang/python32/Makefile =================================================================== --- branches/2016Q1/lang/python32/Makefile (revision 405608) +++ branches/2016Q1/lang/python32/Makefile (revision 405609) @@ -1,135 +1,136 @@ # $FreeBSD$ PORTNAME= python32 PORTVERSION= ${PYTHON_PORTVERSION} +PORTREVISION= 1 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON/ftp/python/${PORTVERSION} DISTNAME= Python-${PORTVERSION} DIST_SUBDIR= python MAINTAINER= python@FreeBSD.org COMMENT= Interpreted object-oriented programming language LICENSE= PSFL DEPRECATED= No longer receives bug fixes, only security updates. Please update to Python 3.5 EXPIRATION_DATE= 2016-02-01 USES= cpe ncurses pkgconfig readline tar:xz USE_OPENSSL= yes USE_LDCONFIG= yes GNU_CONFIGURE= yes CPE_VENDOR= python CPE_PRODUCT= ${CPE_VENDOR} CPE_VERSION= ${PORTVERSION} CONFIGURE_ARGS+= --enable-shared CONFIGURE_ENV+= OPT="" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files TEST_TARGET= buildbottest TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER} MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library MAKE_ARGS+= LIBPC="${PREFIX}/libdata/pkgconfig" # Until pathfix gets support for files other than Makefile.in MAKE_JOBS_UNSAFE= yes # Parser/pgen build bug. See Issue: 200622, 201974 SUB_FILES= pkg-message SUB_LIST= PYTHON_SUFFIX=${PORTVERSION:R:S/.//g} PLIST_SUB= ABI=${ABIFLAGS} \ OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. http://bugs.python.org/issue19554 OPTIONS_DEFINE= DEBUG IPV6 LIBFFI NLS PYMALLOC THREADS TSC UCS4 OPTIONS_DEFAULT= IPV6 LIBFFI NLS PYMALLOC THREADS UCS4 OPTIONS_SUB= yes LIBFFI_DESC= Use libffi from ports instead of bundled version NLS_DESC= Enable gettext support for the locale module PYMALLOC_DESC= Enable specialized mallocs TSC_DESC= Enable processor timestamp counter profiling DEBUG_CONFIGURE_WITH= pydebug IPV6_CONFIGURE_ENABLE= ipv6 LIBFFI_CONFIGURE_ON= --with-system-ffi LIBFFI_LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 # Upstream Issue: http://bugs.python.org/issue6299 NLS_USES= gettext NLS_CPPFLAGS= -I${LOCALBASE}/include NLS_LIBS= -L${LOCALBASE}/lib -lintl NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no PYMALLOC_CONFIGURE_WITH= pymalloc THREADS_CONFIGURE_WITH= threads THREADS_LDFLAGS= -lpthread TSC_CONFIGURE_WITH= tsc UCS4_CONFIGURE_WITH= wide-unicode .include "${.CURDIR}/Makefile.version" .include .if ${PORT_OPTIONS:MUCS4} ABIFLAGS:= u${ABIFLAGS} .endif .if ${PORT_OPTIONS:MPYMALLOC} ABIFLAGS:= m${ABIFLAGS} .endif .if ${PORT_OPTIONS:MDEBUG} ABIFLAGS:= d${ABIFLAGS} .endif .if !empty(ABIFLAGS) PLIST_FILES+= bin/python3.2%%ABI%% PLIST_FILES+= bin/python3.2%%ABI%%-config PLIST_FILES+= libdata/pkgconfig/python-3.2%%ABI%%.pc .endif .if ${ARCH} == sparc64 CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900 .endif # See http://bugs.freebsd.org/115940 and http://bugs.freebsd.org/193650 .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) PLIST_SUB+= NO_NIS="@comment " .else PLIST_SUB+= NO_NIS="" .endif post-patch: @${REINPLACE_CMD} -e \ 's,/usr/doc/python-docs-,${PREFIX}/share/doc/python,g' \ ${PATCH_WRKSRC}/Lib/pydoc.py # Fix for http://bugs.python.org/issue12852 (especially on 10.x+); # not needed for python33+ @${REINPLACE_CMD} -e 's|_XOPEN_SOURCE 600|_XOPEN_SOURCE 700|' \ ${WRKSRC}/configure .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) @${REINPLACE_CMD} -e 's/disabled_module_list =[^]]*/&, "nis"/' \ ${WRKSRC}/setup.py .endif # Fix permissions for keyword.py and token.py - otherwise the cache files # can't be properly recreated, since compileall fails with an IOError. # This looks like an improper fix in http://bugs.python.org/issue6074 # for Python3.2 # Since side effects for other modules can't be foreseen, do not fix # it on a source level yet. @${CHMOD} a-x ${WRKSRC}/Lib/keyword.py ${WRKSRC}/Lib/token.py post-install: .if !${PORT_OPTIONS:MDEBUG} # Upstream Issue: http://bugs.python.org/issue17975 ${RM} -f ${STAGEDIR}${PREFIX}/lib/libpython3.so .endif # Strip shared extensions for i in ${STAGEDIR}${PREFIX}/lib/python3.2/lib-dynload/*.so; do \ ${STRIP_CMD} $$i; done .include Index: branches/2016Q1/lang/python32/files/patch-Lib_distutils_command_install__lib.py =================================================================== --- branches/2016Q1/lang/python32/files/patch-Lib_distutils_command_install__lib.py (nonexistent) +++ branches/2016Q1/lang/python32/files/patch-Lib_distutils_command_install__lib.py (revision 405609) @@ -0,0 +1,34 @@ +From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001 +From: Brendan Molloy +Date: Mon, 4 Jan 2016 23:14:06 +1100 +Subject: [PATCH] Check bytecode file actually exists and tests + +Should solve issue 20397, where using the --record argument results +in files that failed to generate bytecode files are added to the +record file nonetheless. + +--- Lib/distutils/command/install_lib.py.orig 2014-10-12 06:52:02 UTC ++++ Lib/distutils/command/install_lib.py +@@ -165,11 +165,18 @@ class install_lib(Command): + if ext != PYTHON_SOURCE_EXTENSION: + continue + if self.compile: +- bytecode_files.append(imp.cache_from_source( +- py_file, debug_override=True)) ++ candidate = imp.cache_from_source( ++ py_file, debug_override=True) ++ ++ if os.path.isfile(candidate): ++ bytecode_files.append(candidate) ++ + if self.optimize > 0: +- bytecode_files.append(imp.cache_from_source( +- py_file, debug_override=False)) ++ candidate = imp.cache_from_source( ++ py_file, debug_override=False) ++ ++ if os.path.isfile(candidate): ++ bytecode_files.append(candidate) + + return bytecode_files + Property changes on: branches/2016Q1/lang/python32/files/patch-Lib_distutils_command_install__lib.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2016Q1/lang/python33/Makefile =================================================================== --- branches/2016Q1/lang/python33/Makefile (revision 405608) +++ branches/2016Q1/lang/python33/Makefile (revision 405609) @@ -1,123 +1,123 @@ # $FreeBSD$ PORTNAME= python33 PORTVERSION= ${PYTHON_PORTVERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON/ftp/python/${PORTVERSION} DISTNAME= Python-${PORTVERSION} DIST_SUBDIR= python MAINTAINER= python@FreeBSD.org COMMENT= Interpreted object-oriented programming language LICENSE= PSFL DEPRECATED= No longer receives bug fixes, only security updates. Please update to Python 3.5 EXPIRATION_DATE= 2017-09-01 USES= cpe ncurses pkgconfig readline tar:xz USE_OPENSSL= yes USE_LDCONFIG= yes GNU_CONFIGURE= yes CPE_VENDOR= python CPE_PRODUCT= ${CPE_VENDOR} CPE_VERSION= ${PORTVERSION} CONFIGURE_ARGS+= --enable-shared CONFIGURE_ENV+= OPT="" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library MAKE_ARGS+= LIBPC="${PREFIX}/libdata/pkgconfig" # Until pathfix gets support for files other than Makefile.in MAKE_JOBS_UNSAFE= yes # Parser/pgen build bug. See Issue: 200622, 201974 TEST_TARGET= buildbottest TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER} SUB_FILES= pkg-message SUB_LIST= PYTHON_SUFFIX=${PORTVERSION:R:S/.//g} PLIST_SUB= ABI=${ABIFLAGS} \ OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. http://bugs.python.org/issue19554 OPTIONS_DEFINE= DEBUG IPV6 LIBFFI NLS PYMALLOC THREADS TSC OPTIONS_DEFAULT= IPV6 LIBFFI NLS PYMALLOC THREADS OPTIONS_SUB= yes LIBFFI_DESC= Use libffi from ports instead of bundled version NLS_DESC= Enable gettext support for the locale module PYMALLOC_DESC= Enable specialized mallocs TSC_DESC= Enable rocessor timestamp counter profiling DEBUG_CONFIGURE_WITH= pydebug IPV6_CONFIGURE_ENABLE= ipv6 LIBFFI_CONFIGURE_ON= --with-system-ffi LIBFFI_LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 # Upstream Issue: http://bugs.python.org/issue6299 NLS_USES= gettext NLS_CPPFLAGS= -I${LOCALBASE}/include NLS_LIBS= -L${LOCALBASE}/lib -lintl NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no PYMALLOC_CONFIGURE_WITH= pymalloc THREADS_CONFIGURE_WITH= threads THREADS_LDFLAGS= -lpthread TSC_CONFIGURE_WITH= tsc .include "${.CURDIR}/Makefile.version" .include .if ${PORT_OPTIONS:MPYMALLOC} ABIFLAGS:= m${ABIFLAGS} .endif .if ${PORT_OPTIONS:MDEBUG} ABIFLAGS:= d${ABIFLAGS} .endif .if !empty(ABIFLAGS) PLIST_FILES+= bin/python3.3%%ABI%% PLIST_FILES+= bin/python3.3%%ABI%%-config PLIST_FILES+= libdata/pkgconfig/python-3.3%%ABI%%.pc .endif # http://bugs.python.org/issue22521 # http://bugs.python.org/issue23042 .if ${ARCH} == i386 && !${PORT_OPTIONS:MLIBFFI} BROKEN= You must use libffi from ports on i386. Enable the LIBFFI option .endif .if ${ARCH} == sparc64 CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900 .endif # See http://bugs.freebsd.org/115940 and http://bugs.freebsd.org/193650 .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) PLIST_SUB+= NO_NIS="@comment " .else PLIST_SUB+= NO_NIS="" .endif post-patch: .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) @${REINPLACE_CMD} -e 's/disabled_module_list =[^]]*/&, "nis"/' \ ${WRKSRC}/setup.py .endif post-install: .if ! ${PORT_OPTIONS:MDEBUG} ${RM} -f ${STAGEDIR}${PREFIX}/lib/libpython3.so # Upstream Issue: http://bugs.python.org/issue17975 .endif for i in ${STAGEDIR}${PREFIX}/lib/python3.3/lib-dynload/*.so; do \ ${STRIP_CMD} $$i; done # Strip shared extensions .include Index: branches/2016Q1/lang/python33/files/patch-Lib_distutils_command_install__lib.py =================================================================== --- branches/2016Q1/lang/python33/files/patch-Lib_distutils_command_install__lib.py (nonexistent) +++ branches/2016Q1/lang/python33/files/patch-Lib_distutils_command_install__lib.py (revision 405609) @@ -0,0 +1,34 @@ +From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001 +From: Brendan Molloy +Date: Mon, 4 Jan 2016 23:14:06 +1100 +Subject: [PATCH] Check bytecode file actually exists and tests + +Should solve issue 20397, where using the --record argument results +in files that failed to generate bytecode files are added to the +record file nonetheless. + +--- Lib/distutils/command/install_lib.py.orig 2014-10-12 06:52:02 UTC ++++ Lib/distutils/command/install_lib.py +@@ -165,11 +165,18 @@ class install_lib(Command): + if ext != PYTHON_SOURCE_EXTENSION: + continue + if self.compile: +- bytecode_files.append(imp.cache_from_source( +- py_file, debug_override=True)) ++ candidate = imp.cache_from_source( ++ py_file, debug_override=True) ++ ++ if os.path.isfile(candidate): ++ bytecode_files.append(candidate) ++ + if self.optimize > 0: +- bytecode_files.append(imp.cache_from_source( +- py_file, debug_override=False)) ++ candidate = imp.cache_from_source( ++ py_file, debug_override=False) ++ ++ if os.path.isfile(candidate): ++ bytecode_files.append(candidate) + + return bytecode_files + Property changes on: branches/2016Q1/lang/python33/files/patch-Lib_distutils_command_install__lib.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2016Q1/lang/python34/Makefile =================================================================== --- branches/2016Q1/lang/python34/Makefile (revision 405608) +++ branches/2016Q1/lang/python34/Makefile (revision 405609) @@ -1,127 +1,127 @@ # Created by: Kubilay Kocak # $FreeBSD$ PORTNAME= python34 PORTVERSION= ${PYTHON_PORTVERSION} -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON/ftp/python/${PORTVERSION} DISTNAME= Python-${PORTVERSION} DIST_SUBDIR= python MAINTAINER= python@FreeBSD.org COMMENT= Interpreted object-oriented programming language LICENSE= PSFL USES= cpe ncurses pkgconfig readline tar:xz USE_OPENSSL= yes USE_LDCONFIG= yes GNU_CONFIGURE= yes CPE_VENDOR= python CPE_PRODUCT= ${CPE_VENDOR} CPE_VERSION= ${PORTVERSION} DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm CONFIGURE_ARGS+= --enable-shared --without-ensurepip CONFIGURE_ENV+= OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files TEST_TARGET= buildbottest TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER} MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library MAKE_ARGS+= LIBPC="${PREFIX}/libdata/pkgconfig" # Until pathfix gets support for files other than Makefile.in MAKE_JOBS_UNSAFE= yes # Parser/pgen build bug. See Issue: 200622, 201974 SUB_FILES= pkg-message SUB_LIST= PYTHON_SUFFIX=${PORTVERSION:R:S/.//g} PLIST_SUB= ABI=${ABIFLAGS} \ OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. http://bugs.python.org/issue19554 OPTIONS_DEFINE= DEBUG IPV6 LIBFFI NLS PYMALLOC THREADS TSC OPTIONS_DEFAULT= IPV6 LIBFFI NLS PYMALLOC THREADS OPTIONS_RADIO= HASH OPTIONS_RADIO_HASH= FNV SIPHASH OPTIONS_SUB= yes LIBFFI_DESC= Use libffi from ports instead of bundled version NLS_DESC= Enable gettext support for the locale module PYMALLOC_DESC= Enable specialized mallocs TSC_DESC= Enable processor timestamp counter profiling HASH_DESC= Hash Algorithm (PEP-456) FNV_DESC= Modified Fowler-Noll-Vo Algorithm SIPHASH_DESC= SipHash24 Algorithm FNV_CONFIGURE_ON= --with-hash-algorithm=fnv SIPHASH_CONFIGURE_ON= --with-hash-algorithm=siphash24 DEBUG_CONFIGURE_WITH= pydebug IPV6_CONFIGURE_ENABLE= ipv6 LIBFFI_CONFIGURE_ON= --with-system-ffi LIBFFI_LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 # Upstream Issue: http://bugs.python.org/issue6299 NLS_USES= gettext NLS_CPPFLAGS= -I${LOCALBASE}/include NLS_LIBS= -L${LOCALBASE}/lib -lintl NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no PYMALLOC_CONFIGURE_WITH= pymalloc THREADS_CONFIGURE_WITH= threads THREADS_LDFLAGS= -lpthread TSC_CONFIGURE_WITH= tsc .include "${.CURDIR}/Makefile.version" .include .if ${PORT_OPTIONS:MPYMALLOC} ABIFLAGS:= m${ABIFLAGS} .endif .if ${PORT_OPTIONS:MDEBUG} ABIFLAGS:= d${ABIFLAGS} .endif .if !empty(ABIFLAGS) PLIST_FILES+= bin/python3.4%%ABI%% PLIST_FILES+= bin/python3.4%%ABI%%-config PLIST_FILES+= libdata/pkgconfig/python-3.4%%ABI%%.pc .endif # http://bugs.python.org/issue22521 # http://bugs.python.org/issue23042 .if ${ARCH} == i386 && !${PORT_OPTIONS:MLIBFFI} BROKEN= You must use libffi from ports on i386. Enable the LIBFFI option .endif .if ${ARCH} == sparc64 CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900 .endif # See http://bugs.freebsd.org/115940 and http://bugs.freebsd.org/193650 .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) PLIST_SUB+= NO_NIS="@comment " DISABLED_EXTENSIONS+= nis .else PLIST_SUB+= NO_NIS="" .endif post-install: .if ! ${PORT_OPTIONS:MDEBUG} ${RM} -f ${STAGEDIR}${PREFIX}/lib/libpython3.so # Upstream Issue: http://bugs.python.org/issue17975 .endif for i in ${STAGEDIR}${PREFIX}/lib/python3.4/lib-dynload/*.so; do \ ${STRIP_CMD} $$i; done # Strip shared extensions .include Index: branches/2016Q1/lang/python34/files/patch-Lib_distutils_command_install__lib.py =================================================================== --- branches/2016Q1/lang/python34/files/patch-Lib_distutils_command_install__lib.py (nonexistent) +++ branches/2016Q1/lang/python34/files/patch-Lib_distutils_command_install__lib.py (revision 405609) @@ -0,0 +1,35 @@ +From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001 +From: Brendan Molloy +Date: Mon, 4 Jan 2016 23:14:06 +1100 +Subject: [PATCH] Check bytecode file actually exists and tests + +Should solve issue 20397, where using the --record argument results +in files that failed to generate bytecode files are added to the +record file nonetheless. + +--- Lib/distutils/command/install_lib.py.orig 2016-01-08 12:38:49 UTC ++++ Lib/distutils/command/install_lib.py +@@ -165,11 +165,19 @@ class install_lib(Command): + if ext != PYTHON_SOURCE_EXTENSION: + continue + if self.compile: +- bytecode_files.append(importlib.util.cache_from_source( +- py_file, debug_override=True)) ++ candidate = importlib.util.cache_from_source( ++ py_file, debug_override=True) ++ ++ if os.path.isfile(candidate): ++ bytecode_files.append(candidate) ++ + if self.optimize > 0: +- bytecode_files.append(importlib.util.cache_from_source( +- py_file, debug_override=False)) ++ candidate = importlib.util.cache_from_source( ++ py_file, debug_override=False) ++ ++ if os.path.isfile(candidate): ++ bytecode_files.append(candidate) ++ + + return bytecode_files + Property changes on: branches/2016Q1/lang/python34/files/patch-Lib_distutils_command_install__lib.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2016Q1/lang/python35/Makefile =================================================================== --- branches/2016Q1/lang/python35/Makefile (revision 405608) +++ branches/2016Q1/lang/python35/Makefile (revision 405609) @@ -1,133 +1,134 @@ # Created by: Kubilay Kocak # $FreeBSD$ PORTNAME= python DISTVERSION= ${PYTHON_PORTVERSION} +PORTREVISION= 1 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON/ftp/python/${PYTHON_PORTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} DISTNAME= Python-${DISTVERSION} DIST_SUBDIR= python MAINTAINER= python@FreeBSD.org COMMENT= Interpreted object-oriented programming language LICENSE= PSFL USES= cpe ncurses pkgconfig readline tar:xz USE_OPENSSL= yes USE_LDCONFIG= yes GNU_CONFIGURE= yes CPE_VENDOR= python CPE_PRODUCT= ${CPE_VENDOR} CPE_VERSION= ${DISTVERSION} # Duplicate python.mk variables. TODO: Let lang/python?? ports use python.mk bits. PYTHON_VER= ${PYTHON_PORTVERSION:R} PYTHON_VERSION= python${PYTHON_VER} PYTHON_SUFFIX= ${PYTHON_VER:S/.//g} DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm CONFIGURE_ARGS+= --enable-shared --without-ensurepip CONFIGURE_ENV+= OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files TEST_TARGET= buildbottest TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER} MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library MAKE_ARGS+= LIBPC="${PREFIX}/libdata/pkgconfig" # Until pathfix gets support for files other than Makefile.in MAKE_JOBS_UNSAFE= yes # Parser/pgen build bug. See Issue: 200622, 201974 SUB_FILES= pkg-message SUB_LIST= PYTHON_SUFFIX=${PYTHON_SUFFIX} PLIST_SUB= XYDOT=${PYTHON_VER} XY=${PYTHON_SUFFIX} \ XYZDOT=${PYTHON_PORTVERSION} ABI=${ABIFLAGS} \ OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. http://bugs.python.org/issue19554 OPTIONS_DEFINE= DEBUG IPV6 LIBFFI NLS PYMALLOC THREADS TSC OPTIONS_DEFAULT= IPV6 LIBFFI NLS PYMALLOC THREADS OPTIONS_RADIO= HASH OPTIONS_RADIO_HASH= FNV SIPHASH OPTIONS_SUB= yes LIBFFI_DESC= Use libffi from ports instead of bundled version NLS_DESC= Enable gettext support for the locale module PYMALLOC_DESC= Enable specialized mallocs TSC_DESC= Enable processor timestamp counter profiling HASH_DESC= Hash Algorithm (PEP-456) FNV_DESC= Modified Fowler-Noll-Vo Algorithm SIPHASH_DESC= SipHash24 Algorithm FNV_CONFIGURE_ON= --with-hash-algorithm=fnv SIPHASH_CONFIGURE_ON= --with-hash-algorithm=siphash24 DEBUG_CONFIGURE_WITH= pydebug IPV6_CONFIGURE_ENABLE= ipv6 LIBFFI_CONFIGURE_ON= --with-system-ffi LIBFFI_LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 # Upstream Issue: http://bugs.python.org/issue6299 NLS_USES= gettext NLS_CPPFLAGS= -I${LOCALBASE}/include NLS_LIBS= -L${LOCALBASE}/lib -lintl NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no PYMALLOC_CONFIGURE_WITH= pymalloc THREADS_CONFIGURE_WITH= threads THREADS_LDFLAGS= -lpthread TSC_CONFIGURE_WITH= tsc .include "${.CURDIR}/Makefile.version" .include .if ${PORT_OPTIONS:MPYMALLOC} ABIFLAGS:= m${ABIFLAGS} .endif .if ${PORT_OPTIONS:MDEBUG} ABIFLAGS:= d${ABIFLAGS} .endif .if !empty(ABIFLAGS) PLIST_FILES+= bin/python%%XYDOT%%%%ABI%% PLIST_FILES+= bin/python%%XYDOT%%%%ABI%%-config PLIST_FILES+= libdata/pkgconfig/python-%%XYDOT%%%%ABI%%.pc .endif # http://bugs.python.org/issue22521 # http://bugs.python.org/issue23042 .if ${ARCH} == i386 && !${PORT_OPTIONS:MLIBFFI} BROKEN= You must use libffi from ports on i386. Enable the LIBFFI option .endif .if ${ARCH} == sparc64 CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900 .endif # See http://bugs.freebsd.org/115940 and http://bugs.freebsd.org/193650 .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) PLIST_SUB+= NO_NIS="@comment " DISABLED_EXTENSIONS+= nis .else PLIST_SUB+= NO_NIS="" .endif post-install: .if ! ${PORT_OPTIONS:MDEBUG} ${RM} -f ${STAGEDIR}${PREFIX}/lib/libpython3.so # Upstream Issue: http://bugs.python.org/issue17975 .endif for i in ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/lib-dynload/*.so; do \ ${STRIP_CMD} $$i; done # Strip shared extensions .include Index: branches/2016Q1/lang/python35/files/patch-Lib_distutils_command_install__lib.py =================================================================== --- branches/2016Q1/lang/python35/files/patch-Lib_distutils_command_install__lib.py (nonexistent) +++ branches/2016Q1/lang/python35/files/patch-Lib_distutils_command_install__lib.py (revision 405609) @@ -0,0 +1,41 @@ +From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001 +From: Brendan Molloy +Date: Mon, 4 Jan 2016 23:14:06 +1100 +Subject: [PATCH] Check bytecode file actually exists and tests + +Should solve issue 20397, where using the --record argument results +in files that failed to generate bytecode files are added to the +record file nonetheless. +--- + Lib/distutils/command/install_lib.py | 17 +++++++++++++---- + Lib/distutils/tests/test_install_lib.py | 8 ++++++-- + 2 files changed, 19 insertions(+), 6 deletions(-) + +--- Lib/distutils/command/install_lib.py.orig 2015-12-07 01:39:07 UTC ++++ Lib/distutils/command/install_lib.py +@@ -164,12 +164,21 @@ class install_lib(Command): + ext = os.path.splitext(os.path.normcase(py_file))[1] + if ext != PYTHON_SOURCE_EXTENSION: + continue ++ + if self.compile: +- bytecode_files.append(importlib.util.cache_from_source( +- py_file, optimization='')) ++ candidate = importlib.util.cache_from_source( ++ py_file, optimization='') ++ ++ if os.path.isfile(candidate): ++ bytecode_files.append(candidate) ++ + if self.optimize > 0: +- bytecode_files.append(importlib.util.cache_from_source( +- py_file, optimization=self.optimize)) ++ candidate = importlib.util.cache_from_source( ++ py_file, optimization=self.optimize) ++ ++ if os.path.isfile(candidate): ++ bytecode_files.append(candidate) ++ + + return bytecode_files + Property changes on: branches/2016Q1/lang/python35/files/patch-Lib_distutils_command_install__lib.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2016Q1/lang/python35/files/patch-Lib_distutils_tests_test__install__lib.py =================================================================== --- branches/2016Q1/lang/python35/files/patch-Lib_distutils_tests_test__install__lib.py (nonexistent) +++ branches/2016Q1/lang/python35/files/patch-Lib_distutils_tests_test__install__lib.py (revision 405609) @@ -0,0 +1,33 @@ +From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001 +From: Brendan Molloy +Date: Mon, 4 Jan 2016 23:14:06 +1100 +Subject: [PATCH] Check bytecode file actually exists and tests + +Should solve issue 20397, where using the --record argument results +in files that failed to generate bytecode files are added to the +record file nonetheless. +--- + Lib/distutils/command/install_lib.py | 17 +++++++++++++---- + Lib/distutils/tests/test_install_lib.py | 8 ++++++-- + 2 files changed, 19 insertions(+), 6 deletions(-) + +--- Lib/distutils/tests/test_install_lib.py.orig 2015-12-07 01:39:07 UTC ++++ Lib/distutils/tests/test_install_lib.py +@@ -64,11 +64,15 @@ class InstallLibTestCase(support.Tempdir + cmd.distribution.ext_modules = [Extension('foo', ['xxx'])] + cmd.distribution.packages = ['spam'] + cmd.distribution.script_name = 'setup.py' ++ ++ # Create rubbish, uncompilable file ++ f = os.path.join(project_dir, 'spam', 'rubbish.py') ++ self.write_file(f, 'rubbish()') + + # get_outputs should return 4 elements: spam/__init__.py and .pyc, +- # foo.import-tag-abiflags.so / foo.pyd ++ # foo.import-tag-abiflags.so / foo.pyd and rubbish.py (no .pyc) + outputs = cmd.get_outputs() +- self.assertEqual(len(outputs), 4, outputs) ++ self.assertEqual(len(outputs), 5, outputs) + + def test_get_inputs(self): + project_dir, dist = self.create_dist() Property changes on: branches/2016Q1/lang/python35/files/patch-Lib_distutils_tests_test__install__lib.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2016Q1 =================================================================== --- branches/2016Q1 (revision 405608) +++ branches/2016Q1 (revision 405609) Property changes on: branches/2016Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r405569