summaryrefslogtreecommitdiffstats
path: root/lang/python25
diff options
context:
space:
mode:
authoralexbl <alexbl@FreeBSD.org>2007-07-30 09:42:28 +0000
committeralexbl <alexbl@FreeBSD.org>2007-07-30 09:42:28 +0000
commit7d749db4cf14f30613e9a53a08ffa3d3b4575146 (patch)
treead9062005432bbf28f5cce4ad3a1cd32a59dba69 /lang/python25
parent8e2da239f74a82ad1c98b69bd27abb3f4e40ecf3 (diff)
downloadFreeBSD-ports-7d749db4cf14f30613e9a53a08ffa3d3b4575146.zip
FreeBSD-ports-7d749db4cf14f30613e9a53a08ffa3d3b4575146.tar.gz
- Make Python 2.5.1 the default Python version
- Add significantly better support in bsd.python.mk for working with Python Eggs and the easy_install system Tested by: pointyhat runs Approved by: pav (portmgr) Most work by: perky Thanks to: pav
Diffstat (limited to 'lang/python25')
-rw-r--r--lang/python25/Makefile35
-rw-r--r--lang/python25/distinfo6
-rw-r--r--lang/python25/pkg-plist12
3 files changed, 40 insertions, 13 deletions
diff --git a/lang/python25/Makefile b/lang/python25/Makefile
index 33f5cff9..a688a3c 100644
--- a/lang/python25/Makefile
+++ b/lang/python25/Makefile
@@ -5,8 +5,7 @@
# $FreeBSD$
PORTNAME= python25
-PORTVERSION= 2.5
-PORTREVISION= 1
+PORTVERSION= 2.5.1
CATEGORIES= lang python ipv6
MASTER_SITES= ${PYTHON_MASTER_SITES}
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
@@ -39,11 +38,10 @@ PLIST_SUB= PYVER=${PYTHON_VERSION:S/python//} \
DEMODIR= ${PREFIX}/share/examples/${PYTHON_VERSION}
TOOLSDIR= ${PREFIX}/share/${PYTHON_VERSION}
-.if !exists(/usr/bin/ypcat) # the world with NO_NIS
-PLIST_EXCLUDE= 'nis.so$$'
-.else
-PLIST_EXCLUDE= '^$$' # nothing
-.endif
+BIN_SCRIPTS= idle pydoc python python-shared smtpd.py python-config \
+ python-shared-config
+BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \
+ -e 's,(idle|pydoc|python-shared|python),\1${PYTHON_VER},'
OPTIONS= THREADS "Enable thread support" on \
HUGE_STACK_SIZE "Use a larger thread stack" off \
@@ -54,6 +52,13 @@ OPTIONS= THREADS "Enable thread support" on \
.include <bsd.port.pre.mk>
+.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION}
+MLINKS= ${PYTHON_VERSION}.1 python.1
+PLIST_SUB+= IF_DEFAULT=""
+.else
+PLIST_SUB+= IF_DEFAULT="@comment "
+.endif
+
# workaround for a bug in base curses.h.
CFLAGS+= -D__wchar_t=wchar_t
@@ -95,6 +100,12 @@ PLIST_SUB+= 32BIT_ONLY=""
CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900
.endif
+.if !exists(/usr/bin/ypcat) # the world with NO_NIS
+PLIST_SUB+= NO_NIS="@comment "
+.else
+PLIST_SUB+= NO_NIS=""
+.endif
+
.if ${OSVERSION} < 400000
LIB_DEPENDS+= ncurses.5:${PORTSDIR}/devel/ncurses
CFLAGS+= -I${LOCALBASE}/include/ncurses -I${LOCALBASE}/include
@@ -180,8 +191,7 @@ pre-su-install:
.endfor
pre-install:
- ${EGREP} -v ${PLIST_EXCLUDE} ${PLIST_TEMPLATE} | \
- ${AWK} '{ print $$0; } \
+ ${CAT} ${PLIST_TEMPLATE} | ${AWK} '{ print $$0; } \
/LIBDIR.*\.py$$/ && !/\/bad/ { print $$0 "o"; print $$0 "c"; }' > ${PLIST}
@# if openssl 0.9.8 is detected, _sha{256,512} module won't be installed
@@ -211,6 +221,13 @@ post-install:
${INSTALL_MAN} ${PYTHON_WRKSRC}/Misc/python.man \
${MANPREFIX}/man/man1/${PYTHON_VERSION}.1
+.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION}
+ for f in ${BIN_SCRIPTS}; do \
+ TARGET=`${ECHO_CMD} $$f | ${SED} -E ${BINLINKS_SUB}`; \
+ cd ${PREFIX}/bin && ${LN} -f $$TARGET $$f; \
+ done
+.endif
+
.if !defined(NOPORTDOCS)
@${MKDIR} ${TOOLSDIR}
@cd ${PYTHON_WRKSRC}; ${TAR} -cf - Tools | \
diff --git a/lang/python25/distinfo b/lang/python25/distinfo
index 7f7cbde..9a63d62 100644
--- a/lang/python25/distinfo
+++ b/lang/python25/distinfo
@@ -1,3 +1,3 @@
-MD5 (python/Python-2.5.tgz) = bc1b74f90a472a6c0a85481aaeb43f95
-SHA256 (python/Python-2.5.tgz) = d7bbf42e36003c6065cd19f3e67d283521858515ee923220f654131cebe1d8f2
-SIZE (python/Python-2.5.tgz) = 11019675
+MD5 (python/Python-2.5.1.tgz) = cca695828df8adc3e69b637af07522e1
+SHA256 (python/Python-2.5.1.tgz) = 1f5caee846049ca30d996f9403eefdb996295c4af664867e35dcc5eb36e4e7e8
+SIZE (python/Python-2.5.1.tgz) = 11060830
diff --git a/lang/python25/pkg-plist b/lang/python25/pkg-plist
index 6526f34..3098736 100644
--- a/lang/python25/pkg-plist
+++ b/lang/python25/pkg-plist
@@ -1,9 +1,16 @@
+%%IF_DEFAULT%%bin/idle
bin/idle%%PYVER%%
+%%IF_DEFAULT%%bin/pydoc
bin/pydoc%%PYVER%%
+%%IF_DEFAULT%%bin/python
bin/python%%PYVER%%
+%%IF_DEFAULT%%bin/python-config
bin/python%%PYVER%%-config
+%%IF_DEFAULT%%bin/python-shared
bin/python-shared%%PYVER%%
+%%IF_DEFAULT%%bin/python-shared-config
bin/python-shared%%PYVER%%-config
+%%IF_DEFAULT%%bin/smtpd.py
bin/smtpd%%PYVER%%.py
%%PYTHON_INCLUDEDIR%%/Python-ast.h
%%PYTHON_INCLUDEDIR%%/Python.h
@@ -670,7 +677,7 @@ lib/lib%%PYTHON_VERSION%%.so.1
%%PYTHON_LIBDIR%%/lib-dynload/itertools.so
%%PYTHON_LIBDIR%%/lib-dynload/math.so
%%PYTHON_LIBDIR%%/lib-dynload/mmap.so
-%%PYTHON_LIBDIR%%/lib-dynload/nis.so
+%%NO_NIS%%%%PYTHON_LIBDIR%%/lib-dynload/nis.so
%%PYTHON_LIBDIR%%/lib-dynload/operator.so
%%PYTHON_LIBDIR%%/lib-dynload/ossaudiodev.so
%%PYTHON_LIBDIR%%/lib-dynload/parser.so
@@ -860,6 +867,7 @@ lib/lib%%PYTHON_VERSION%%.so.1
%%PYTHON_LIBDIR%%/test/exception_hierarchy.txt
%%PYTHON_LIBDIR%%/test/fork_wait.py
%%PYTHON_LIBDIR%%/test/greyrgb.uue
+%%PYTHON_LIBDIR%%/test/infinite_reload.py
%%PYTHON_LIBDIR%%/test/inspect_fodder.py
%%PYTHON_LIBDIR%%/test/inspect_fodder2.py
%%PYTHON_LIBDIR%%/test/list_tests.py
@@ -984,6 +992,7 @@ lib/lib%%PYTHON_VERSION%%.so.1
%%PYTHON_LIBDIR%%/test/test_compile.py
%%PYTHON_LIBDIR%%/test/test_compiler.py
%%PYTHON_LIBDIR%%/test/test_complex.py
+%%PYTHON_LIBDIR%%/test/test_complex_args.py
%%PYTHON_LIBDIR%%/test/test_contains.py
%%PYTHON_LIBDIR%%/test/test_contextlib.py
%%PYTHON_LIBDIR%%/test/test_cookie.py
@@ -1183,6 +1192,7 @@ lib/lib%%PYTHON_VERSION%%.so.1
%%PYTHON_LIBDIR%%/test/test_strop.py
%%PYTHON_LIBDIR%%/test/test_strptime.py
%%PYTHON_LIBDIR%%/test/test_struct.py
+%%PYTHON_LIBDIR%%/test/test_structmembers.py
%%PYTHON_LIBDIR%%/test/test_structseq.py
%%PYTHON_LIBDIR%%/test/test_subprocess.py
%%PYTHON_LIBDIR%%/test/test_sunaudiodev.py
OpenPOWER on IntegriCloud