X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 2BBF7DC0486 for ; Wed, 3 Sep 2014 20:44:28 +0000 (UTC) Received: by mail-pa0-f42.google.com with SMTP id lf10so18365261pab.15 for ; Wed, 03 Sep 2014 13:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=rOnW7+NvELCUTs9KNeW3szH1Rm4nl+NJBvrS2iGBgEo=; b=hJaQsPGQVrPBsNvKjZM6CGZZrb7HVa8DlQl6AUfvc+SVfyarSjfsZ93bO/YKaBLEVG 5CsWCkpjOONCai68L1Lbxv6EGdeOwg9zqjzfcvh+flPzEdzD9Hq0Up6Fy+C1Zv1Ihbgy unk1pE2iHkzCoQFOnVgJpdYABgiJeMpHiVxNkGIEmUlueiiEIJtyxqC+5aEiGGGiweXJ C2OIrNNdE1/xjvttXWEX/8u7oP5upUhd8xpmJOh0bLVasUN566z6pFs4wlvbU0/7kXSw JmL8hpVHyeHq4Tjxij1/jz12TYXhIViVpl+fXrtvJWq7wrkt0y2VUssTjFvo2U0kKhCi +RYQ== X-Received: by 10.66.161.232 with SMTP id xv8mr70075pab.81.1409777067943; Wed, 03 Sep 2014 13:44:27 -0700 (PDT) Received: from newbook ([50.0.228.159]) by mx.google.com with ESMTPSA id fz10sm10132643pdb.50.2014.09.03.13.44.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Sep 2014 13:44:27 -0700 (PDT) Date: Wed, 3 Sep 2014 13:44:24 -0700 From: Isaac Dunham To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [RFC] First draft: add Tkinter to python Message-ID: <20140903204421.GA1780@newbook> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, I'm trying to get Tkinter in python; while I know that needs to wait for tk to move to main, I'm not sure how to get the whole thing working right. The biggest problem is that Tkinter needs Tk, which ultimately needs libxcb, which in turn has python in makedepends. But I'm not sure what's a good way to handle that. Also, this would make quite a few things ultimately depend on X11. Here is a patch that works to build Tkinter when PYTHON_TK is not set to "false". Any recommendations? Thanks, Isaac Dunham --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pytk.diff" commit 9c68991e15c129e02bd3bb5cad62545deb86de12 Author: Isaac Dunham Date: Wed Sep 3 11:57:57 2014 -0700 main/python: Build tkinter. There is a build loop here; I'm not sure how to solve it. diff --git a/main/python/APKBUILD b/main/python/APKBUILD index 6acf299..39c6811 100644 --- a/main/python/APKBUILD +++ b/main/python/APKBUILD @@ -19,6 +19,17 @@ source="http://www.$pkgname.org/ftp/$pkgname/$pkgver/Python-$pkgver.tar.xz unchecked-ioctl.patch " +# when bringing up a platform, tk will drag in the X11 client libs +: ${PYTHON_TK:=true} +if ${PYTHON_TK}; then + echo "Building with Tkinter" + makedepends="$makedepends tk-dev" + subpackages="$subpackages py-tkinter:tkinter" + export TCLLIBS="`pkg-config --libs tk`" + export TCLINCS="`pkg-config --cflags tk`" + export CONFIGFLAGS='--with-tcltk-libs=${TCLLIBS} --with-tcltk-includes=${TCLINCS}' + fi + prepare() { cd "$srcdir/Python-$pkgver" for i in $source; do @@ -52,6 +63,7 @@ build() { --with-system-expat \ --with-system-zlib \ --enable-unicode=ucs4 \ + $CONFIGFLAGS \ || return 1 make || return 1 } @@ -95,6 +107,12 @@ gdbm() { _mv_files $(find usr/lib -name '*gdbm*') } +tkinter() { + pkgdesc="Tk interface support for Python" + cd "$pkgdir" + _mv_files $(find usr/lib -name 'lib-tk' -o -name '_tkinter.so') +} + md5sums="d235bdfa75b8396942e360a70487ee00 Python-2.7.8.tar.xz 5d8ca92fa6f187573104593470a9d3d5 find_library.patch dada786a50fa332686a9b9260d84c110 unchecked-ioctl.patch" --azLHFNyN32YCQGCU-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---