Date: Tue, 5 Jan 2016 05:32:43 +0100 From: Olivier Duchateau <duchateau.olivier@gmail.com> To: "Mikhail T." <mi+thun@aldan.algebra.com> Cc: python <python@freebsd.org> Subject: Re: SOLVED: numpy would not load: libgcc_s vs. libgfortran Message-ID: <CAHcdu2ptxi3avRWwxfy1X44EzeEpv-Y3ntMcLAsuvRd9UcSSBQ@mail.gmail.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
2016-01-05 0:13 GMT+01:00 Mikhail T. <mi+thun@aldan.algebra.com>: > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHcdu2ptxi3avRWwxfy1X44EzeEpv-Y3ntMcLAsuvRd9UcSSBQ>