From owner-freebsd-python@freebsd.org Tue Jan 5 04:32:44 2016 Return-Path: Delivered-To: freebsd-python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 398ADA62C3E for ; Tue, 5 Jan 2016 04:32:44 +0000 (UTC) (envelope-from duchateau.olivier@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 2014B1897 for ; Tue, 5 Jan 2016 04:32:44 +0000 (UTC) (envelope-from duchateau.olivier@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 1D47AA62C3C; Tue, 5 Jan 2016 04:32:44 +0000 (UTC) Delivered-To: python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CEC2A62C3B for ; Tue, 5 Jan 2016 04:32:44 +0000 (UTC) (envelope-from duchateau.olivier@gmail.com) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E188F1896 for ; Tue, 5 Jan 2016 04:32:43 +0000 (UTC) (envelope-from duchateau.olivier@gmail.com) Received: by mail-ig0-x22f.google.com with SMTP id ph11so6683318igc.1 for ; Mon, 04 Jan 2016 20:32:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=V0/bZojV0GgyhqezlNYXO/Pj9OkPiw6hdmLfDWaeljw=; b=DrhSsC2r/BL/zHRkSvGyAszfcqqlGAX2TEaJtBW9Ck+0ndMZ81937pTs5bPtnomGkc CW5xNgF+jlrtnhyRhkiL+fzKm8xqNEseFrbSZ/o/G0UdsRBQ7x++N2FKxjZBiKXsr8RQ CXoB7je8E73hD1xRmqMzxRoHWXHJGrBKdtMlRFK2mY18i0LasJL9lboh0A28GQ4N++vG Lzo3FYJRrk3uYgqcoTaHXWeyXPm2Av471n+tXQ/cgY8deVJG741UBci6pBFoBKwp2dKv bFqvo9AMLPv10ItvjvjR1vyKsDhmJ463dgx+WqLe/RXg+MX10hhFPX9+XeKvkfGWBmYy 1jvQ== MIME-Version: 1.0 X-Received: by 10.50.147.1 with SMTP id tg1mr1800734igb.48.1451968363319; Mon, 04 Jan 2016 20:32:43 -0800 (PST) Received: by 10.107.31.3 with HTTP; Mon, 4 Jan 2016 20:32:43 -0800 (PST) In-Reply-To: <568AFC99.1010001@aldan.algebra.com> References: <568AA168.5090400@aldan.algebra.com> <20160104193453.2ae62e7a01ab0a0cd845e296@gmail.com> <568AC046.8040300@aldan.algebra.com> <20160104213150.4e47df03583e70cef356a51d@gmail.com> <568AE454.6010604@aldan.algebra.com> <568AEB8C.2000805@aldan.algebra.com> <20160104235913.13cbed5baa5b33b3bdef375f@gmail.com> <568AFC99.1010001@aldan.algebra.com> Date: Tue, 5 Jan 2016 05:32:43 +0100 Message-ID: Subject: Re: SOLVED: numpy would not load: libgcc_s vs. libgfortran From: Olivier Duchateau To: "Mikhail T." Cc: python Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 04:32:44 -0000 2016-01-05 0:13 GMT+01:00 Mikhail T. : > On 04.01.2016 18:59, Olivier Duchateau wrote: > >> I wonder, if this has something to do with my setting PYTHONPATH -- I >> need the not-yet-installed mediagoblin packages to be found in ${WRKSRC} >> by the tests. What is the proper way of to do this? > > You can add module (and submodules) with sys module. > > For example in mediagoblin/tests/tools.py before line beginning by 'from > mediagoblin ...' > > import sys > > # Full path of mediagoblin > sys.append('/spare/usr/ports/www/py-mediagoblin/work/mediagoblin-0.8.1/mediagoblin') > > Ouch! I was hoping, I could set an environment variable and be done with it > -- something like PATH or LD_LIBRARY_PATH or TCLPATH... It's PYTHONPATH [1]. It depends of your shell export PYTHONPATH=${PYTHONPATH}:/spare/usr/ports/www/py-mediagoblin/work/mediagoblin-0.8.1/mediagoblin or setenv PYTHONPATH ${PYTHONPATH}:/spare/usr/ports/www/py-mediagoblin/work/mediagoblin-0.8.1/mediagoblin In my previous message, it should be sys.modules.append('...') not sys.append('...') [1] https://docs.python.org/2/using/cmdline.html#envvar-PYTHONPATH > > -mi -- olivier