From owner-freebsd-ports@FreeBSD.ORG Sat Dec 17 10:23:54 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F6AC1065680 for ; Sat, 17 Dec 2011 10:23:54 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward12.mail.yandex.net (forward12.mail.yandex.net [IPv6:2a02:6b8:0:801::2]) by mx1.freebsd.org (Postfix) with ESMTP id A67F98FC19 for ; Sat, 17 Dec 2011 10:23:53 +0000 (UTC) Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [95.108.130.68]) by forward12.mail.yandex.net (Yandex) with ESMTP id 20B07C231A9; Sat, 17 Dec 2011 14:23:52 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1324117432; bh=5CmBSZ/EPMlUKi4y5UpYmBK2BoGfv5wYvdpqC79O+wI=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Tfm+blp5NFPNrNgl9hQ6Xj+L4LFu5jQ9AZ/Q2fXXe/u2VsblswdvhtgZEY83DHY4p i6p58p6w2zATtrq/PYyqS3HHymjaUYEkTF9bnNQDYNMBu+uQAx18FnJky1oV0Z9zmL 3uN1xH7tTW08FosWH1mKl19cLAg641iIZgJgbNG8= Received: from smtp13.mail.yandex.net (localhost [127.0.0.1]) by smtp13.mail.yandex.net (Yandex) with ESMTP id F1AC6E40406; Sat, 17 Dec 2011 14:23:51 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1324117432; bh=5CmBSZ/EPMlUKi4y5UpYmBK2BoGfv5wYvdpqC79O+wI=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Tfm+blp5NFPNrNgl9hQ6Xj+L4LFu5jQ9AZ/Q2fXXe/u2VsblswdvhtgZEY83DHY4p i6p58p6w2zATtrq/PYyqS3HHymjaUYEkTF9bnNQDYNMBu+uQAx18FnJky1oV0Z9zmL 3uN1xH7tTW08FosWH1mKl19cLAg641iIZgJgbNG8= Received: from unknown (unknown [213.27.65.65]) by smtp13.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Np2Kk613-Np2KDdFd; Sat, 17 Dec 2011 14:23:51 +0400 X-Yandex-Spam: 1 Message-ID: <4EEC6D9D.1020102@yandex.ru> Date: Sat, 17 Dec 2011 14:23:25 +0400 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111109 Thunderbird/8.0 MIME-Version: 1.0 To: Christer Edwards References: In-Reply-To: X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "freebsd-ports@FreeBSD.org" Subject: Re: RUN_DEPENDS for python based port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Dec 2011 10:23:54 -0000 Christer Edwards wrote on 17.12.2011 11:54: > I've been working on building my first python based port recently and > I'm running into some issue that I'm hoping the list can provide some > tips for. Currently the Makefile looks like this: > > ----- > > # New ports collection makefile for: salt > # Date created: 17 Dec 2011 > # Whom: cedwards > # > # $FreeBSD$ > # > > PORTNAME= salt > PORTVERSION= 0.9.4 > CATEGORIES= sysutils python > MASTER_SITES= https://github.com/downloads/saltstack/salt/ > > MAINTAINER= christer.edwards@gmail.com > COMMENT= Central system and configuration manager > > LIB_DEPENDS= zmq.1:${PORTSDIR}/devel/zmq > > USE_PYTHON= yes > USE_PYDISTUTILS=yes > > 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 > > ----- > > 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. -- Regards, Ruslan Tinderboxing kills... the drives.