From owner-freebsd-python@FreeBSD.ORG Sat Sep 7 20:01:56 2013 Return-Path: Delivered-To: python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 65B2CBE3 for ; Sat, 7 Sep 2013 20:01:56 +0000 (UTC) (envelope-from rnejdl@ringofsaturn.com) Received: from tethys.ringofsaturn.com (tethys.ringofsaturn.com [71.252.219.43]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3B9C12291 for ; Sat, 7 Sep 2013 20:01:55 +0000 (UTC) Received: from ASSP.nospam (localhost [127.0.0.1]) (authenticated bits=0) by tethys.ringofsaturn.com (8.14.7/8.14.7) with ESMTP id r87K1t2I000392 for ; Sat, 7 Sep 2013 15:01:55 -0500 (CDT) (envelope-from rnejdl@ringofsaturn.com) Received: from mail.ringofsaturn.com ([127.0.0.1] helo=mail.ringofsaturn.com) by ASSP.nospam with ESMTP (ASSP 1.9.9); 7 Sep 2013 15:01:55 -0500 MIME-Version: 1.0 Date: Sat, 07 Sep 2013 15:01:55 -0500 From: Rusty Nejdl To: python@freebsd.org Subject: Re: Port Request Mail-Reply-To: rnejdl@ringofsaturn.com In-Reply-To: <20130907193930.GB32163@medusa.sysfault.org> References: <4a8cb0aaace54a329f5723aaf4b25858@ringofsaturn.com> <20130907193930.GB32163@medusa.sysfault.org> Message-ID: X-Sender: rnejdl@ringofsaturn.com User-Agent: Roundcube Webmail/0.9.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: rnejdl@ringofsaturn.com List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 20:01:56 -0000 On 2013-09-07 14:39, Marcus von Appen wrote: > On, Sat Sep 07, 2013, Rusty Nejdl wrote: > > [...] > >> [tethys]:/home/rnejdl/Downloads/apsw/apsw-3.8.0.2-r1> python setup.py build running build running build_ext SQLite: Using system sqlite include/libraries building 'apsw' extension creating build creating build/temp.freebsd-9.2-PRERELEASE-amd64-2.7 creating build/temp.freebsd-9.2-PRERELEASE-amd64-2.7/src cc -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -march=nocona -DNDEBUG -O2 -pipe -fno-strict-aliasing -march=nocona -fPIC -DEXPERIMENTAL=1 -DNDEBUG=1 -DAPSW_FORK_CHECKER=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -Isrc -I/usr/local/include/python2.7 -c src/apsw.c -o build/temp.freebsd-9.2-PRERELEASE-amd64-2.7/src/apsw.o src/apsw.c:58:21: error: sqlite3.h: No such file or directory src/apsw.c:62:2: error: #error Your SQLite version is too old. It must be at least 3.8.0 In file included from src/apsw.c:128: src/exceptions.c:24: error: expected declaration specifiers or '...' before 'sqlite3' How do I get setup.py to find sqlite3.h at /usr/local/include/sqlite3.h ? > > By passing in the correct CFLAGS. By default C extensions to Python just > include the relevant Python CFLAGS. Since you need the sqlite headers, > which are located in /usr/local/include, execute the following (bourne > shell): > > # CFLAGS=-I/usr/local/include python setup.py build > > And since I guess that apsw links to libsqlite3, also pass the > LDFLAGS=-L/usr/local/lib: > > # CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib python setup.py build > > For your port Makefile that'd mean that you should set > > CFLAGS+= -I${LOCALBASE}/include > LDFLAGS+= -L${LOCALBASE}/lib > > Cheers > Marcus Marcus, Nicely done and that fixed it so it compiles now. Now, the last part I am stuck on is that the package has an underscore in it: Writing /usr/local/lib/python2.7/site-packages/apsw-3.8.0.2_r1-py2.7.egg-info which kills me on deinstall: On 2013-09-07 14:39, Marcus von Appen wrote: > On, Sat Sep 07, 2013, Rusty Nejdl wrote: > > [...] > >> [tethys]:/home/rnejdl/Downloads/apsw/apsw-3.8.0.2-r1> python setup.py build running build running build_ext SQLite: Using system sqlite include/libraries building 'apsw' extension creating build creating build/temp.freebsd-9.2-PRERELEASE-amd64-2.7 creating build/temp.freebsd-9.2-PRERELEASE-amd64-2.7/src cc -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -march=nocona -DNDEBUG -O2 -pipe -fno-strict-aliasing -march=nocona -fPIC -DEXPERIMENTAL=1 -DNDEBUG=1 -DAPSW_FORK_CHECKER=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -Isrc -I/usr/local/include/python2.7 -c src/apsw.c -o build/temp.freebsd-9.2-PRERELEASE-amd64-2.7/src/apsw.o src/apsw.c:58:21: error: sqlite3.h: No such file or directory src/apsw.c:62:2: error: #error Your SQLite version is too old. It must be at least 3.8.0 In file included from src/apsw.c:128: src/exceptions.c:24: error: expected declaration specifiers or '...' before 'sqlite3' How do I get setup.py to find sqlite3.h at /usr/local/include/sqlite3.h ? > > By passing in the correct CFLAGS. By default C extensions to Python just > include the relevant Python CFLAGS. Since you need the sqlite headers, > which are located in /usr/local/include, execute the following (bourne > shell): > > # CFLAGS=-I/usr/local/include python setup.py build > > And since I guess that apsw links to libsqlite3, also pass the > LDFLAGS=-L/usr/local/lib: > > # CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib python setup.py build > > For your port Makefile that'd mean that you should set > > CFLAGS+= -I${LOCALBASE}/include > LDFLAGS+= -L${LOCALBASE}/lib > > Cheers > Marcus Marcus, Nicely done and that fixed it so it compiles now. Now, the last part I am stuck on is that the package has an underscore in it: Writing /usr/local/lib/python2.7/site-packages/apsw-3.8.0.2_r1-py2.7.egg-info which kills me on deinstall: pkg_delete: file '/usr/local/lib/python2.7/site-packages/apsw-3.8.0.2-py2.7.egg-info' doesn't exist On other ports I've always had to create a pkg-plist but the python infrastructure seems to handle all of that automatically. I've looked around and can't find how to work around this. Thanks in advance yet again! Rusty Nejdl From owner-freebsd-python@FreeBSD.ORG Sat Sep 7 21:09:27 2013 Return-Path: Delivered-To: python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 385E77D5 for ; Sat, 7 Sep 2013 21:09:27 +0000 (UTC) (envelope-from mva@FreeBSD.org) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.29.23]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA0B42562 for ; Sat, 7 Sep 2013 21:09:26 +0000 (UTC) Received: from [89.183.9.2] (helo=localhost) by smtprelay01.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1VIPen-000899-IP; Sat, 07 Sep 2013 23:03:01 +0200 Date: Sat, 7 Sep 2013 23:03:01 +0200 From: Marcus von Appen To: rnejdl@ringofsaturn.com Subject: Re: Port Request Message-ID: <20130907210300.GD32163@medusa.sysfault.org> Mail-Followup-To: rnejdl@ringofsaturn.com, python@freebsd.org References: <4a8cb0aaace54a329f5723aaf4b25858@ringofsaturn.com> <20130907193930.GB32163@medusa.sysfault.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="at6+YcpfzWZg/htY" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Df-Sender: MTEyNTc0Mg== Cc: python@freebsd.org X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Marcus von Appen List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 21:09:27 -0000 --at6+YcpfzWZg/htY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline [...] > Nicely done and that fixed it so it compiles now. Now, the last part I > am stuck on is that the package has an underscore in it: > > Writing > /usr/local/lib/python2.7/site-packages/apsw-3.8.0.2_r1-py2.7.egg-info > > which kills me on deinstall: > > pkg_delete: file > '/usr/local/lib/python2.7/site-packages/apsw-3.8.0.2-py2.7.egg-info' > doesn't exist You can change the name of the egg-info file via the PYDISTUTILS_EGGINFO variable. Something like the following might do the trick for you: PYDISTUTILS_EGGINFO=${PORTNAME}-${PORTVERSION}_r1-py${PYTHON_VER}... However, the egg-info consists of multiple parts, so you might go an easier route by setting PYDISTUTILS_PKGVERSION to something like: PYDISTUTILS_PKGVERSION= ${PORTVERSION}_r1 and leave the _EGGINFO variable alone. Check /usr/ports/Mk/bsd.python.mk for further details about how the egg info file name is built, The documentation on the knobs is fairly good. Cheers Marcus --at6+YcpfzWZg/htY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iEYEARECAAYFAlIrlIQACgkQi68/ErJnpkcReQCgj5SpoF9BqEMPZn9VDoA3oD2a HJMAn3VQkBvRs3mTjQjBbNup0g0OxJHg =iE/p -----END PGP SIGNATURE----- --at6+YcpfzWZg/htY--