From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:60803) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRaTo-0007hc-Ll for guix-patches@gnu.org; Mon, 04 Nov 2019 06:25:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRaTn-0007iO-21 for guix-patches@gnu.org; Mon, 04 Nov 2019 06:25:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55336) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iRaTm-0007hq-MR for guix-patches@gnu.org; Mon, 04 Nov 2019 06:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iRaTm-0005no-CO for guix-patches@gnu.org; Mon, 04 Nov 2019 06:25:02 -0500 Subject: [bug#38052] [PATCH 1/3] gnu: Add python-wxpython. References: In-Reply-To: Resent-Message-ID: From: Arun Isaac Date: Mon, 4 Nov 2019 16:54:15 +0530 Message-Id: <20191104112418.10030-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38052@debbugs.gnu.org Cc: Arun Isaac * gnu/packages/wxwidgets.scm (python-wxpython): New variable. --- gnu/packages/wxwidgets.scm | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm index caa0ad2372..48e6c31f6c 100644 --- a/gnu/packages/wxwidgets.scm +++ b/gnu/packages/wxwidgets.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017 Efraim Flashner ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2019 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,6 +43,7 @@ #:use-module (gnu packages video) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages sdl) #:use-module (gnu packages webkit) #:use-module (gnu packages xorg) @@ -165,6 +167,66 @@ and many other languages.") (package-inputs wxwidgets-3.1)))) (name "wxwidgets-gtk2"))) +(define-public python-wxpython + (package + (name "python-wxpython") + (version "4.0.7.post1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "wxPython" version)) + (sha256 + (base32 + "1jppcr3n428m8pgwb9q3g0iiqydxd451ncri4njk8b53xsiflhys")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove bundled wxwidgets + (delete-file-recursively "ext/wxWidgets") + #t)))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'configure + (lambda* (#:key inputs #:allow-other-keys) + (setenv "WXWIN" (assoc-ref inputs "wxwidgets")) + ;; Copy the waf executable to the source directory since it needs + ;; to be in a writable directory. + (copy-file (string-append (assoc-ref inputs "python-waf") "/bin/waf") + "bin/waf") + (setenv "WAF" "bin/waf") + ;; The build script tries to copy license files from the + ;; wxwidgets source tree. Prevent it. + (substitute* "wscript" + (("updateLicenseFiles\\(cfg\\)" all) + (string-append "#" all))) + ;; The build script tries to write to demo/version.py. So, we set + ;; correct write permissions. + (chmod "demo/version.py" #o644) + ;; Build only the python bindings, not wxwidgets also. + (substitute* "setup.py" + (("'build']") "'build_py', '--use_syswx']")) + #t))))) + (inputs + `(("gtk+" ,gtk+) + ("wxwidgets" ,wxwidgets))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python-waf" ,python-waf))) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-pillow" ,python-pillow) + ("python-six" ,python-six))) + (home-page "http://wxPython.org/") + (synopsis "Cross platform GUI toolkit for Python") + (description "wxPython is a cross-platform GUI toolkit for the Python +programming language. It is implemented as a set of Python extension modules +that wrap the GUI components of the popular wxWidgets cross platform C++ +library. In most cases, wxPython uses the native widgets on each platform to +provide a 100% native look and feel for the application.") + (license l:wxwindows3.1+))) + (define-public python2-wxpython (package (name "python2-wxpython") -- 2.23.0