From owner-svn-ports-head@FreeBSD.ORG Thu Sep 26 20:54:55 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B9630B97; Thu, 26 Sep 2013 20:54:55 +0000 (UTC) (envelope-from william88@gmail.com) Received: from mail-qe0-x230.google.com (mail-qe0-x230.google.com [IPv6:2607:f8b0:400d:c02::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48F9F2A6D; Thu, 26 Sep 2013 20:54:55 +0000 (UTC) Received: by mail-qe0-f48.google.com with SMTP id nd7so1240024qeb.35 for ; Thu, 26 Sep 2013 13:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wPezCiR/hUVEsocI1wo18+OJ1HUzg5UnRgl3W5hytx0=; b=HrclVjJQ2oYaPf/Z6spNRbcjWGDEbKH48MfYeyZE3YX4p1j6rDGuz7RnjJCkxjOnsk 6lxQWQxG8FO+7Py0wGnibzCXM7LyLIaQm7kbXS75HrOgKa4RdKIlMhcaMse2xTo5hJoy q3RpVJAKoitMUkBBZlmcOrq571IAKa+fEx8HenRTzpz6TB2AcZq1FtFgifcYHpv99Ctz X1ffKvYIaGi9Hh8qfiXvGV+23h+5TN1U1rnJkzv8/DnJdxypDVDayhHLRgbMKCcuBHsH l9pO7qlGCiZYBSwW072TAw6tkK5Azjou1P1ZpNgTQDEc7HxE7ucsR3032hVELPSbS5/n O9sA== MIME-Version: 1.0 X-Received: by 10.224.165.136 with SMTP id i8mr9494097qay.82.1380228894378; Thu, 26 Sep 2013 13:54:54 -0700 (PDT) Received: by 10.140.81.233 with HTTP; Thu, 26 Sep 2013 13:54:54 -0700 (PDT) In-Reply-To: <201309261827.r8QIR2Y8090911@svn.freebsd.org> References: <201309261827.r8QIR2Y8090911@svn.freebsd.org> Date: Thu, 26 Sep 2013 17:54:54 -0300 Message-ID: Subject: Re: svn commit: r328403 - head/Mk From: William Grzybowski To: Marcus von Appen Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-ports-head@freebsd.org" , "svn-ports-all@freebsd.org" , ports-committers X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 20:54:55 -0000 On Thu, Sep 26, 2013 at 3:27 PM, Marcus von Appen wrote: > Author: mva > Date: Thu Sep 26 18:27:02 2013 > New Revision: 328403 > URL: http://svnweb.freebsd.org/changeset/ports/328403 > > Log: > - Introduce a new port Makefile knob PYDISTUTILS_AUTOPLIST. > > This will cause the ports framework to create the plist automatically > for distutils-based ports. All files installed via Python's distutils > mechanisms (either the traditional distutils or easy_install) will be > automtically added to the package list, regardless of the Python > version. It is somewhat similar to the RUBYGEM_AUTOPLIST knob. > > - Introduce a new port Makefile knob PYTHON_PY3K_PLIST_HACK. > > This automatically replaces .pyc and .pyo package list entries with > the relevant __pycache__ entries for Python 3.x. It should only be > used for ports, which do not use one of Python's default package > installation mechanisms and which are guaranteed to work with any > python version. > > Modified: > head/Mk/bsd.python.mk > > Modified: head/Mk/bsd.python.mk > ============================================================================== > --- head/Mk/bsd.python.mk Thu Sep 26 18:23:42 2013 (r328402) > +++ head/Mk/bsd.python.mk Thu Sep 26 18:27:02 2013 (r328403) > @@ -94,16 +94,16 @@ Python_Include_MAINTAINER= python@FreeBS > # - Version of the default python2 binary in your ${PATH}, in > # the format "python2.7". Set this in your /etc/make.conf > # in case you want to use a specific version as a default. > -# Note that PYTHON_DEFAULT_VERSION always will have precedence > -# before this value, if it matches "python2*" > +# Note that PYTHON_DEFAULT_VERSION always will have > +# precedence before this value, if it matches "python2*" > # default: python2.7 > # > # PYTHON3_DEFAULT_VERSION > # - Version of the default python3 binary in your ${PATH}, in > # the format "python3.2". Set this in your /etc/make.conf > # in case you want to use a specific version as a default. > -# Note that PYTHON_DEFAULT_VERSION always will have precedence > -# before this value, if it matches "python3*" > +# Note that PYTHON_DEFAULT_VERSION always will have > +# precedence before this value, if it matches "python3*" > # default: python3.3 > # > # PYTHON_MAJOR_VER - Python version major number. 2 for python-2.x, > @@ -139,6 +139,17 @@ Python_Include_MAINTAINER= python@FreeBS > # PYSETUP - Name of the setup script used by the distutils package. > # default: setup.py > # > +# PYDISTUTILS_AUTOPLIST > +# - Generate the packaging list for distutils based ports > +# (including easy_install) automatically. > +# > +# PYTHON_PY3K_PLIST_HACK > +# - Automatically replaces .pyc and .pyo package list entries > +# with the relevant __pycache__ entries for Python 3.x. > +# This should only be used for ports, which do not use one > +# of Python's default package installation mechanisms and > +# which are guaranteed to work with any python version. > +# > # PYDISTUTILS_PKGNAME > # - Internal name in the distutils for egg-info. > # default: ${PORTNAME} > @@ -476,6 +487,7 @@ PYDISTUTILS_EGGINFO?= ${PYDISTUTILS_PKGN > PYDISTUTILS_EGGINFODIR?=${PYTHONPREFIX_SITELIBDIR} > > .if !defined(PYDISTUTILS_NOEGGINFO) && \ > + !defined(PYDISTUTILS_AUTOPLIST) && \ > (defined(INSTALLS_EGGINFO) || \ > (defined(USE_PYDISTUTILS) && \ > ${USE_PYDISTUTILS} != "easy_install")) && \ > @@ -485,6 +497,46 @@ PLIST_FILES+= ${PYDISTUTILS_EGGINFODIR:S > . endfor > .endif > > +.if defined(PYDISTUTILS_AUTOPLIST) && defined(USE_PYDISTUTILS) > +_PYTHONPKGLIST= ${WRKDIR}/.PLIST.pymodtmp > +PYDISTUTILS_INSTALLARGS:= --record ${_PYTHONPKGLIST} \ > + ${PYDISTUTILS_INSTALLARGS} > + > +_RELSITELIBDIR= ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} > + > +add-plist-post: add-plist-pymod > +add-plist-pymod: > + { ${ECHO_CMD} "#mtree"; ${CAT} ${MTREE_FILE}; } | ${TAR} tf - | \ > + ${SED} '/^\.$$/d' > ${WRKDIR}/.localmtree > + ${ECHO_CMD} "${_RELSITELIBDIR}" >> ${WRKDIR}/.localmtree > + ${SED} 's|^${PREFIX}/||' ${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST} > + ${SED} -e 's|^${PREFIX}/\(.*\)/\(.*\)|\1|' ${_PYTHONPKGLIST} | \ > + while read line; do \ > + ${GREP} -qw "^$${line}$$" ${WRKDIR}/.localmtree || { \ > + [ -n "$${line}" ] && \ > + ${ECHO_CMD} "@unexec rmdir $${line} 2>/dev/null || true"; \ > + }; \ > + done | ${SORT} | uniq | ${SORT} -r >> ${TMPPLIST} This logic iteration to find directories seems wrong. If I am not wrong and we have: dira/dirb/file1 dira/dirc/file2 And no files within dira/ it endes up removing dira/dirb/ and dira/dirc/, but not dira/. Also, see this about enabling easy_install with AUTOPLIST and staging: http://people.freebsd.org/~wg/easyinstall-stage.txt Thanks -- William Grzybowski ------------------------------------------ Curitiba/PR - Brasil