svn commit: r368241 - in head/sysutils: . jadm jadm/files

Adam Weinberger adamw at adamw.org
Mon Sep 15 16:29:56 UTC 2014


On 15 Sep, 2014, at 12:05, Jason E. Hale <jhale at freebsd.org> wrote:

> On Mon, Sep 15, 2014 at 10:36 AM, Adam Weinberger <adamw at adamw.org> wrote:
>> On 15 Sep, 2014, at 3:50, Jason E. Hale <jhale at FreeBSD.org> wrote:
>> 
>>> On Sun, Sep 14, 2014 at 10:27 PM, Vanilla I. Shu <vanilla at freebsd.org> wrote:
>>>> 
>>>> +BUILD_DEPENDS= ${PYTHON_LIBDIR}/site-packages/paramiko/:${PORTSDIR}/security/py-paramiko \
>>>> +               ${PYTHON_LIBDIR}/site-packages/netifaces.so:${PORTSDIR}/net/py-netifaces \
>>>> +               ${PYTHON_LIBDIR}/site-packages/tabulate.py:${PORTSDIR}/devel/py-tabulate \
>>>> +               ${PYTHON_LIBDIR}/site-packages/ipaddress.py:${PORTSDIR}/net/py-ipaddress
>>> 
>>> This is a deprecated style of depending on other Python ports.
>>> Format should be:
>>> BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}paramiko>=0:${PORTSDIR}/security/py-paramiko
>> 
>> I had no idea that format was deprecated. Perhaps an example could be added to the PHB or Uses/python.mk?
>> 
> I'm sure the Python section of the PHB could use some attention.  It
> still references the old USE_PYTHON and
> bsd.python.mk instead of USES=python and Uses/python.mk among other things.
> 
> The format I mentioned is the one I have seen in most Python and Perl
> ports, however, Uses/python.mk has a mix
> of both styles. I guess "deprecated" was a little strong, that's more
> of an official word.  "Not so common" might be
> more appropriate.  To me, it looks cleaner and allows for version
> checking.  Even still, ${PYTHON_SITELIBDIR}
> would be preferable to ${PYTHON_LIBDIR}/site-packages.

No I totally agree with you. It’d just be really nice if you could count on the PHB being full of examples of best-practice.

The funny thing is, each thing that you mentioned in your original message to Vanilla (LICENSE_FILE, PYTHON_PKGNAMEPREFIX, OPSYS, and not using ${CP})... none of those things are spelled out in the PHB.

I would think that the vast majority of the PHB should be like Section 6... a big list of “Using xyz”. Alphabetize it, and every time somebody wants to know how to do x, they just jump to that section. Right now, there is essentially no structure.

I especially love that the sample Makefile demonstrates an interactive port, clobbers variables, uses sets EXTRACT_SUFX manually, and contains more filler text than code. The sample makefile should be self-documenting, and should be a proper set of real-world uses that people can look at as a positive reference.

</soapbox>

# Adam


-- 
Adam Weinberger
adamw at adamw.org
http://www.adamw.org



More information about the svn-ports-head mailing list