# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup select 1.0
name python32
epoch 20120412
# Remember to keep py32-tkinter and py32-gdbm's versions sync'd with this
version 3.2.6
revision 8
set major [lindex [split $version .] 0]
set branch [join [lrange [split ${version} .] 0 1] .]
categories lang
license PSF
platforms darwin
maintainers nomaintainer
description An interpreted, object-oriented programming language
long_description Python is an interpreted, interactive, object-oriented \
programming language.
homepage https://www.python.org/
master_sites ${homepage}ftp/python/${version}/
distname Python-${version}
use_xz yes
checksums md5 e0ba4360dfcb4aec735e666cc0ae7b0e \
rmd160 f3f5877cd3ac03151f161353e808a38204f1270d \
sha256 1d12b501819fd26afafbf8459be1aa279b56f032b4c15412de0a713ce0de7bdc
patchfiles patch-setup.py.diff \
patch-Lib-cgi.py.diff \
patch-Lib-distutils-dist.py.diff \
patch-configure.diff \
patch-setup.py-disabled_modules.diff \
patch-libedit.diff \
patch-Lib-site.py-omit_local_site_packages.diff \
patch-Include-pyport.h.diff \
uuid-64bit.patch
# https://bugs.python.org/issue21811
patchfiles-append patch-configure_configure.ac-yosemite_configure_fixes.diff \
patch-Lib-distutils-util.py_Mac-BuildScript-build-installer.py-yosemite_python_fixes.diff
depends_lib port:zlib port:openssl10 \
port:sqlite3 port:ncurses \
port:bzip2 port:libedit port:gettext
depends_run port:python_select
configure.args --enable-framework=${frameworks_dir} \
--enable-ipv6 \
--enable-loadable-sqlite-extensions \
--with-computed-gotos
configure.ccache no
configure.cppflags-prepend -I${prefix}/include/openssl-1.0
configure.ldflags-prepend -L${prefix}/lib/openssl-1.0
use_parallel_build yes
post-patch {
reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/Lib/cgi.py
reinplace "s|/setup.py|/setup.py --no-user-cfg|" ${worksrcpath}/Makefile.pre.in
# replace /Applications with ${applications_dir}
reinplace "s|@@APPLICATIONS_DIR@@|${applications_dir}|" \
${worksrcpath}/configure
# See https://trac.macports.org/changeset/37861
reinplace "s|xargs -0 rm -r|/usr/bin/xargs -0 /bin/rm -r|g" \
${worksrcpath}/Mac/PythonLauncher/Makefile.in
}
build.target all
# test_cmd_line fails
# see https://bugs.python.org/issue4388 and
# https://bugs.python.org/issue4474
test.run yes
test.target test
destroot.target frameworkinstall maninstall
# ensure that correct compiler is used
build.args-append MAKE="${build.cmd} CC=${configure.cc}"
destroot.args-append MAKE="${destroot.cmd} CC=${configure.cc}"
select.group python
select.file ${filespath}/python[string map {. {}} ${branch}]