Date: Wed, 2 Jul 2014 01:44:08 +0200 From: CeDeROM <cederom@tlen.pl> To: koobs@freebsd.org Cc: freebsd-hackers@freebsd.org, freebsd-ports <freebsd-ports@freebsd.org> Subject: Re: port - python dependencies and github master Message-ID: <CAFYkXjnTx0pOEzB-bjNtSv=bbgxsP6C6mTeOTicayz8JWJY4iQ@mail.gmail.com> In-Reply-To: <53B33B12.8030005@FreeBSD.org> References: <CAFYkXjkb2UsKHb3=uFz4yZBHG7GDK7QrnJA2dfm4_jn_S5coZg@mail.gmail.com> <53B33B12.8030005@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello Koobs and thank you for your hints!! :-) On Wed, Jul 2, 2014 at 12:49 AM, Kubilay Kocak <koobs@freebsd.org> wrote: >> 1. How to change PORTVERSION / GH_COMMIT based on user choice / >> option? One value for PORTVERSION seems fine but to change it to >> master does not work.. > > You very probably don't want to do this. PORTVERSION needs to be static, > in the sense that it can't be conditional. Ugh, thats the problem. I have notcied that :-( At least for the first time I change the Makefile both RELEASE and DEVEL works, but then it does not work... just as Makefile was somehow cached and remembers PORTVERSION even if I change its value it still use the old value or any numeric value which is found on the Makefile even inside conditional statement.. strange :-) > This is because PORTVERSION plus a few other variables is how the ports > framework derives DISTFILES, who's checksums must remain consistent > unless changed/updated by the maintainer (see distinfo file) I would like to make a port to build a package by default, but also I would like to have option to build a devel package. No additional port for that is necessary. That would save frequent port updates, just one smart Makefile that would do the job :-) This seems sensible, but I have noticed checksum problems here when PORTVERSION is changed on the fly.. Other question if additional cura-devel port is mandatory - how can I fetch HEAD and then get the commit number to add to the package name to distinguish different builds? If PORTVERSION must be static, then should I add some package suffix that can be based on a dynamic value/variable? >> 2. Is the way to check python modules dependency correct? >> >> PORTNAME= cura >> PORTVERSION= 14.06 >> #STABLEREL= 14.06 >> CATEGORIES= cad > > Add the 'python' category as a secondary category to Python ports ACK! :-) >> MAINTAINER= blah@blah >> COMMENT= Cura is a complete and open slicing solution for >> RepRap 3D printers. > > Don't include the package/software name or indefinite articles (A/An) in > COMMENT. Also strip the trailing full stop (period). ACK! :-) >> OPTIONS_SINGLE= BTYPE >> OPTIONS_SINGLE_BTYPE= RELEASE DEVEL >> OPTIONS_SUB= yes >> RELEASE_DESC= Build latest stable release from github (${PORTVERSION}) >> DEVEL_DESC= Build latest development snapshot from github master >> OPTIONS_DEFAULT= RELEASE >> >> .include <bsd.port.options.mk> >> >> #.if ${PORT_OPTIONS:MRELEASE} >> #PORTVERSION= ${STABLEREL} >> #.endif >> >> .if ${PORT_OPTIONS:MDEVEL} >> PORTVERSION= master >> #STABLEREL= master >> .endif >> >> #PORTVERSION= ${STABLEREL} >> >> USE_PYTHON= yes > > You at least want USE_PYDISTUTILS=yes here, and maybe > PYDISTUTILS_AUTOPLIST=yes also. > > See /usr/ports/Mk/bsd.python.mk for more information. ACK! :-) >> RUN_DEPENDS+= > > First assignment of {RUN,BUILD}_DEPENDS should be = not += > >> ${PYTHONPREFIX_SITELIBDIR}/OpenGL:${PORTSDIR}/graphics/py-opengl \ >> ${PYTHONPREFIX_SITELIBDIR}/numpy:${PORTSDIR}/math/py-numpy \ >> >> ${PYTHONPREFIX_SITELIBDIR}/setuptools:${PORTSDIR}/devel/py-setuptools >> \ >> ${PYTHONPREFIX_SITELIBDIR}/serial:${PORTSDIR}/comms/py-serial >> BUILD_DEPENDS+= git:${PORTSDIR}/devel/git > > If you're not depending on a binary (like the git line above), the > simplest way is to depend on the package names. Eg: > > ${PYTHON_PKGNAMEPREFIX}setuptools>[0|<version>]:${PORTSDIR}/category/<portname> I know the Porter's Handbook, but there is no information on how to verify the dependencies on python modules. Using ${PYTHON_PKGNAMEPREFIX} would search for binaries, which is not the case. This is why I have "invented" ${PYTHONPREFIX_SITELIBDIR}/OpenGL which works well and checks if a given python module is available :-) > If you need any porting help, we have a few IRC channels available for you: > > 1) #freebsd-ports - freenode > 2) #freebsd-python - freenode > 3) #bsdports - Efnet Thank you I will connect that way! :-) Best regards :-) Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFYkXjnTx0pOEzB-bjNtSv=bbgxsP6C6mTeOTicayz8JWJY4iQ>