On 2012-04-03, Emil <emi...@gmail.com> wrote:
> Hi, I have a Python package, 'foo' that I can install with distutils,
> into Sage's site-packages directory. It contains a Cython file,
> 'bar.pyx'. Now, if in the setup.py file, I have
>
> Extension('bar', ...)
>
> then everything works fine, except that 'bar.so' gets put in
> site-packages, rather than site-packages/foo. Everything works, and
> the python files in site-packages/foo can do "import bar".
>
> However, if I have
>
> Extension('foo.bar', ...)
>
> in setup.py, then 'bar.so' gets put in site-packages/foo, which is
> what I want, but now nothing can import it... I was wondering whether
> LD_LIBRARY_PATH or something needs to be set?

Probably. You can see what Sage does in this regard by looking
at the value of LD_LIBRARY_PATH in Sage shell 
(i.e. when you run sage -sh)

>
> I'd like to be able to distribute my package, but I want everything
> contained in site-packages/foo .... Thanks,
>
>
> Emil
>

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to