RUN_DEPENDS for python based port

Chris Rees crees at freebsd.org
Sat Dec 17 10:35:14 UTC 2011


On 17 December 2011 10:23, Ruslan Mahmatkhanov <cvs-src at yandex.ru> wrote:
> Christer Edwards wrote on 17.12.2011 11:54:
<snip>
>> RUN_DEPENDS+=
>> ${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-pycrypto
>> \
>>
>> ${PYTHON_SITELIBDIR}/${PYEASYINSTALL_EGG}/jinja2/__init__.py:${PORTSDIR}/devel/py-Jinja2
>> \
>>
>> ${PYTHON_PKGNAMEPREFIX}M2Crypto>=0:${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>=0:${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
>   'Programming Language :: Python :: 2.6',
>   'Programming Language :: Python :: 2.7',
> 2. Code licensed by Apache Software License.
>   'License :: OSI Approved :: Apache Software License'
>
> So USE_PYTHON=yes should be changed with USE_PYTHON=    2.6-2.7, (otherwise
> port build will fail with python3) and LICENSE= 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+=
${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-pycrypto
\

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

Chris


More information about the freebsd-ports mailing list