Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Dec 2011 10:34:42 +0000
From:      Chris Rees <crees@freebsd.org>
To:        Ruslan Mahmatkhanov <cvs-src@yandex.ru>
Cc:        Christer Edwards <christer.edwards@gmail.com>, "freebsd-ports@FreeBSD.org" <freebsd-ports@freebsd.org>
Subject:   Re: RUN_DEPENDS for python based port
Message-ID:  <CADLo83-8=GgcXmGWfH1zuqXeKp24qkwtLRfm3BXCZ-2_1k4_YQ@mail.gmail.com>
In-Reply-To: <4EEC6D9D.1020102@yandex.ru>
References:  <CAH2d3%2BvMF8jM6GHJQ6DR7EywmnY%2Bj=0tSHFEf_5oW1C6QhYD8A@mail.gmail.com> <4EEC6D9D.1020102@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On 17 December 2011 10:23, Ruslan Mahmatkhanov <cvs-src@yandex.ru> wrote:
> Christer Edwards wrote on 17.12.2011 11:54:
<snip>
>> RUN_DEPENDS+=3D
>> ${PYTHON_SITELIBDIR}/yaml/__init__.py:${PORTSDIR}/devel/py-yaml \
>>
>> ${PYTHON_SITELIBDIR}/zmq/__init__.py}:${PORTSDIR}/devel/py-pyzmq \
>>
>> ${PYTHON_SITELIBDIR}/Crypto/Cipher/__init__.py:${PORTSDIR}/security/py-p=
ycrypto
>> \
>>
>> ${PYTHON_SITELIBDIR}/${PYEASYINSTALL_EGG}/jinja2/__init__.py:${PORTSDIR}=
/devel/py-Jinja2
>> \
>>
>> ${PYTHON_PKGNAMEPREFIX}M2Crypto>=3D0:${PORTSDIR}/security/py-m2crypto
>>
>> .include <bsd.port.mk>
>>
>> -----
>>
>> I'm not sure if I've done the RUN_DEPENDS properly, because when I try
>> to 'make' the port, it tries running the salt tool and complains about
>> missing python modules. The modules are of course provided by the
>> depends, but they don't get installed if they're missing.
>>
>> I'd really like whatever feedback the list can offer to getting this
>> ported properly.
>>
>> Cheers,
>> Christer
>
> Chris and Matthew already noted what the problems are.
> I also suggest to use:
>
> ${PYTHON_PKGNAMEPREFIX}yaml>=3D0:${PORTSDIR}/devel/py-yaml
>
> instead of:
>
> ${PYTHON_SITELIBDIR}/yaml/__init__.py:${PORTSDIR}/devel/py-yaml
> and
> ${PYTHON_SITELIBDIR}/${PYEASYINSTALL_EGG}/jinja2/__init__.py:${PORTSDIR}/=
devel/py-Jinja2
>
> Right now you use three possible forms to depend on needed ports.
> Better do this change because if sometime some of dependent packages
> will be converted to installing via setuptools (eggs packaging) you'll
> need to fix them in your port, because there will not be
> `yaml/__init__.py' anymore for example.
> First construct will work in both cases and unification is always good
> thing to do.
>
> And the second note. setup.py discloses that:
> 1. Port will work with python2.6/2.7 only
> =9A 'Programming Language :: Python :: 2.6',
> =9A 'Programming Language :: Python :: 2.7',
> 2. Code licensed by Apache Software License.
> =9A 'License :: OSI Approved :: Apache Software License'
>
> So USE_PYTHON=3Dyes should be changed with USE_PYTHON=3D =9A =9A2.6-2.7, =
(otherwise
> port build will fail with python3) and LICENSE=3D ASL worth to be added.

Ruslan is absolutely right, we also do that with most perl
dependencies; I was waiting for someone on python@ to point it out ;)

Also, another mistake I've noticed:

RUN_DEPENDS+=3D
${PYTHON_SITELIBDIR}/yaml/__init__.py:${PORTSDIR}/devel/py-yaml \

${PYTHON_SITELIBDIR}/zmq/__init__.py}:${PORTSDIR}/devel/py-pyzmq \

${PYTHON_SITELIBDIR}/Crypto/Cipher/__init__.py:${PORTSDIR}/security/py-pycr=
ypto
\

Are these extra newlines from wrapping? If not, you've made a BIG
screwup there!  The lines must be one after the other.

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83-8=GgcXmGWfH1zuqXeKp24qkwtLRfm3BXCZ-2_1k4_YQ>