diff --git a/Mk/bsd.python.mk b/Mk/bsd.python.mk index b15b35d1894c..c0d56d66e0ab 100644 --- a/Mk/bsd.python.mk +++ b/Mk/bsd.python.mk @@ -152,14 +152,14 @@ Python_Include_MAINTAINER= python@FreeBSD.org # # PYDISTUTILS_EGGINFO # - Canonical name for egg-info. -# default: ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-${PYTHON_VERSION:S/thon//}.egg-info +# default: ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info # # PYDISTUTILS_NOEGGINFO # - Skip an egg-info entry from plist when defined. # # PYEASYINSTALL_EGG # - Canonical directory name for easy_install egg packages. -# default: ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-${PYTHON_VERSION:S/thon//}${PYEASYINSTALL_OSARCH}.egg +# default: ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}${PYEASYINSTALL_OSARCH}.egg # # PYEASYINSTALL_OSARCH # - Platform identifier for easy_install. @@ -286,7 +286,7 @@ USE_PYTHON= ${USE_PYTHON_BUILD} .elif defined(USE_PYTHON_RUN) USE_PYTHON= ${USE_PYTHON_RUN} .else -USE_PYTHON= any +USE_PYTHON= yes .endif # defined(USE_PYTHON_BUILD) .else USE_PYTHON_BUILD= yes @@ -364,6 +364,9 @@ PYTHON_PORTSDIR= ${PORTSDIR}/lang/python32 PYTHON_REL= 320 PYTHON_SUFFIX= 32 PYTHON_VER= 3.2 +.if exists(${PYTHON_CMD}-config) +PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags +.endif # Python-3.1 .elif ${PYTHON_VERSION} == "python3.1" @@ -433,7 +436,8 @@ PYTHON_MASTER_SITE_SUBDIR= ftp/python/${PYTHON_PORTVERSION:C/rc[0-9]//} PYTHON_DISTFILE= Python-${PYTHON_PORTVERSION:S/.rc/rc/}.tgz PYTHON_WRKSRC= ${WRKDIR}/Python-${PYTHON_PORTVERSION:S/.rc/rc/} -PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/${PYTHON_VERSION} +PYTHON_ABIVER?= # empty +PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/${PYTHON_VERSION}${PYTHON_ABIVER} PYTHON_LIBDIR= ${PYTHONBASE}/lib/${PYTHON_VERSION} PYTHON_PKGNAMEPREFIX= py${PYTHON_SUFFIX}- PYTHON_PKGNAMESUFFIX= -py${PYTHON_SUFFIX} @@ -446,8 +450,13 @@ PYTHONPREFIX_SITELIBDIR= ${PYTHON_SITELIBDIR:S;${PYTHONBASE};${PREFIX};} # setuptools support .if defined(USE_PYDISTUTILS) && ${USE_PYDISTUTILS} == "easy_install" +.if ${PYTHON_SUFFIX} < 30 BUILD_DEPENDS+= ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-setuptools RUN_DEPENDS+= ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-setuptools +.else +BUILD_DEPENDS+= ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-distribute +RUN_DEPENDS+= ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-distribute +.endif PYDISTUTILS_BUILD_TARGET?= bdist_egg PYDISTUTILS_INSTALL_TARGET?= easy_install @@ -465,7 +474,7 @@ _OSRELEASE!= ${UNAME} -r .endif PYEASYINSTALL_OSARCH?= -${OPSYS:L}-${_OSRELEASE}-${ARCH} .endif -PYEASYINSTALL_EGG?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-${PYTHON_VERSION:S/thon//}${PYEASYINSTALL_OSARCH}.egg +PYEASYINSTALL_EGG?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}${PYEASYINSTALL_OSARCH}.egg PYEASYINSTALL_CMD?= ${LOCALBASE}/bin/easy_install-${PYTHON_VER} PYEASYINSTALL_BINDIR?= ${PREFIX}/bin PYEASYINSTALL_SITELIBDIR?= ${PYTHONPREFIX_SITELIBDIR} @@ -503,7 +512,7 @@ PYDISTUTILS_BUILDARGS?= PYDISTUTILS_INSTALLARGS?= -c -O1 --prefix=${PREFIX} PYDISTUTILS_PKGNAME?= ${PORTNAME} PYDISTUTILS_PKGVERSION?=${PORTVERSION} -PYDISTUTILS_EGGINFO?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-${PYTHON_VERSION:S/thon//}.egg-info +PYDISTUTILS_EGGINFO?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info PYDISTUTILS_EGGINFODIR?=${PYTHONPREFIX_SITELIBDIR} .if !defined(PYDISTUTILS_NOEGGINFO) && \