From: Dominique O. <dom...@gm...> - 2010-03-19 14:28:03
|
On Thu, Mar 11, 2010 at 7:39 PM, Rob Speer <rs...@mi...> wrote: > I'm having two problems that make it difficult to install Pysparse in > many situations. I'm writing a library that depends on Pysparse, but I > can't distribute this library if Pysparse itself won't install. > > > 1. Pysparse doesn't support "setup.py develop". This means it cannot > be installed through Pip. > > This seems to be because of the line: > package_dir = {package_name: 'Lib'}, > > The problem is that there is no valid directory to put on the Python > path. Here's a bug report about this issue (which was closed as > invalid in Pip because they concluded it's a problem with either > setuptools or pysparse): > > http://bitbucket.org/ianb/pip/issue/72/editable-install-doesnt-respect-package_dir > > It sounds like this could be fixed by reorganizing the code structure, > or at least making a symlink, so that there is an actual "pysparse" > directory at the top level. Renaming "Lib" to "pysparse" might be the > right answer. > > > 2. Pysparse won't install in a virtualenv. It tries to install files > in the include/ directory of your Python environment, but virtualenvs > don't have their own include directory. They just symlink to the > system-wide one. > > I don't know what the correct way to resolve this one is, because I've > never had to manage additional include files in a Python package. Rob, Thanks for the feedback. #1 has been on my list for a long time but never gets adressed because time is scarce. I really want to have a proper setup.py for Pysparse. I'm now getting better at writing them so maybe I can whip up something quick. Regarding #2, could you be more specific? In my experience, package-specific include files always go to the include/ directory of the local Python environment. However, you can normally install packages "locally" (e.g., in your home directory) instead of system wide, by using an option such as --prefix or --home with setup.py. I might have misunderstood your question... Cheers, -- Dominique |