Help with porting Python libraries

Charlie Li ml+freebsd at vishwin.info
Sun Dec 29 18:32:33 UTC 2019


Andrea Venturoli wrote:
> I've got a system where I had to install a few Python libraries with
> pip, but I don't like this, since pkg info will not list them.
> 
> Thus I'm trying to port them, but I never ported Python libraries
> before; so, before I submit my work, I thought I'd ask if someone more
> experienced than me might have a look at it.
> 
> My first attempt was at IMAPClient: I copied another port
> (net/py-GeoIP2) and modified it; this is the Makefile I came up with.
> 
>> # $FreeBSD$
>>
>> PORTNAME=    IMAPClient
>> PORTVERSION=    2.1.0
>> CATEGORIES=    mail python
>> PKGNAMEPREFIX=    ${PYTHON_PKGNAMEPREFIX}
>>
>> MAINTAINER=    ml at netfence.it
>> COMMENT=    Easy-to-use, Pythonic and complete IMAP client library
>>
>> LICENSE=    BSD3CLAUSE
>>
>> RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}
>>
>> GH_ACCOUNT=    mjs
>> GH_PROJECT=    imapclient
>>
>> NO_ARCH=    yes
>> USES=        python
>> USE_GITHUB=    yes
>> USE_PYTHON=    autoplist distutils
>>
>> .include <bsd.port.mk>
> 
> "port test" gives some warning, but seems to say it's ok.
> Anything wrong?
> 
Since you said you installed these Python packages with pip, they are
probably on pypi. In that case, it is recommended to use CHEESESHOP as
the MASTER_SITE (cheeseshop is the old name for pypi itself) instead of
going through github.

Also recommend reading through the documentation in the "Using Python"
chapter in the Porter's Handbook and the comments in Uses/python.mk to
really understand everything you're doing.

-- 
Charlie Li
…nope, still don't have an exit line.

(This email address is for mailing list use; replace local-part with
vishwin for off-list communication if possible)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20191229/5c376021/attachment.sig>


More information about the freebsd-ports mailing list