unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 38128@debbugs.gnu.org, mbakke@fastmail.com, goodoldpaul@autistici.org
Subject: [bug#38128] [PATCH] gnu: Add boost-with-python3
Date: Mon, 11 Nov 2019 11:36:37 +0200	[thread overview]
Message-ID: <20191111093637.GH3954@E5400> (raw)
In-Reply-To: <87d0dzl7tx.fsf@devup.no>


[-- Attachment #1.1: Type: text/plain, Size: 576 bytes --]

I'm going to re-open this one, sorry.

Can we replace the '--with-python-version=3.7' and 'libboost_python37.so'
with parameterized python variables so we don't have to bump it when we
get a new python version?

Also, I've attached a package that I've never actually built that uses
boost built with python3 if you want something to test it out with :)


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: epour.scm --]
[-- Type: text/plain, Size: 4839 bytes --]

;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is an addendum to GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (wip epour)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system python)
  #:use-module (gnu packages bittorrent)
  #:use-module (gnu packages boost)
  #:use-module (gnu packages enlightenment)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages glib) ; intltool
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-web)
  #:use-module (gnu packages python-xyz)
  #:use-module (srfi srfi-1))

(define-public epour
  (package
    (name "epour")
    (version "0.7.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://download.enlightenment.org/rel/apps/epour"
                            "/epour-" version ".tar.xz"))
        (sha256
         (base32
          "0g9f9p01hsq6dcf4cs1pwq95g6fpkyjgwqlvdjk1km1i5gj5ygqw"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f   ; no test target
       #:phases
       (modify-phases %standard-phases
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (invoke "python" "setup.py" "install" (string-append "--prefix=" out))
               #t))))))
    (native-inputs `(("intltool" ,intltool)))
    (propagated-inputs
     `(("libtorrent-rasterbar-local" ,libtorrent-rasterbar-local)
       ("python-dbus" ,python-dbus)
       ("python-distutils-extra" ,python-distutils-extra)
       ("python-efl" ,python-efl)
       ;("python-parse" ,python-parse)
       ("python-pyxdg" ,python-pyxdg)
       ;("python-urllib3" ,python-urllib3)
       ))
    (home-page "https://www.enlightenment.org")
    (synopsis "EFL Bittorrent client")
    (description "Epour is a BitTorrent client based on the @dfn{Enlightenment
Foundation Libraries} (EFL) and rb-libtorrent.")
    (license license:gpl3+)))

(define libtorrent-rasterbar-local
  (package
    (inherit libtorrent-rasterbar)
    (inputs
     `(("boost" ,boost-with-python3)
       ,@(alist-delete "boost"
                        (package-inputs libtorrent-rasterbar))))
    (native-inputs
     `(("python" ,python-3)
       ,@(alist-delete "python"
                        (package-native-inputs libtorrent-rasterbar))))))

(define boost-local
  (package
    (inherit boost)
    (arguments
     `(#:imported-modules (,@%gnu-build-system-modules
                            (guix build python-build-system))
       ,@(substitute-keyword-arguments (package-arguments boost)
         ((#:phases phases)
          `(modify-phases ,phases
             (replace 'provide-libboost_python
               (lambda* (#:key outputs inputs #:allow-other-keys)
                 (let* ((out (assoc-ref outputs "out"))
                        (py-version ((@@ (guix build python-build-system)
                                         get-python-version) (assoc-ref inputs "python")))
                        (py-suffix (string-join (string-split py-version #\.) "")))
                   ;; Boost can build support for both Python 2 and Python 3 since
                   ;; version 1.67.0, and suffixes each library with the Python
                   ;; version.  Many consumers only check for libboost_python
                   ;; however, so we provide it here as suggested in
                   ;; <https://github.com/boostorg/python/issues/203>.
                   (with-directory-excursion (string-append out "/lib")
                     (symlink (string-append "libboost_python" py-suffix ".so")
                              "libboost_python.so"))
                   #t))))))))
    (native-inputs
     `(("python" ,python-wrapper)
       ,@(alist-delete "python"
                        (package-native-inputs boost))))))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-11-11  9:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 10:59 [bug#38128] [PATCH] gnu: Add boost-with-python3 goodoldpaul
2019-11-10 21:50 ` bug#38128: " Marius Bakke
2019-11-11  9:36   ` Efraim Flashner [this message]
2019-11-12  0:06     ` [bug#38128] " goodoldpaul
2019-11-16  9:04       ` [bug#38228] Fwd: [PATCH] gnu: boost: Build with python3 goodoldpaul
2019-11-20  0:01         ` Marius Bakke
2019-12-09 11:24           ` goodoldpaul
2020-01-08 21:11             ` bug#38228: " Marius Bakke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191111093637.GH3954@E5400 \
    --to=efraim@flashner.co.il \
    --cc=38128@debbugs.gnu.org \
    --cc=goodoldpaul@autistici.org \
    --cc=mbakke@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).