From: Dominique O. <dom...@gm...> - 2010-03-25 14:18:15
|
On Wed, Mar 24, 2010 at 5:24 PM, Rob Speer <rs...@mi...> wrote: >>> 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... > > Responding to this part now: does your local Python environment > actually have its own include/ directory? Because my virtualenv just > has a symbolic link to the Python global one. This means that > installing pysparse in a virtualenv requires permission to modify the > global Python include directory, and it does so. No my virtual environment doesn't have its own include dir. All it has is a symlink to the system include dir. This looks like a defect of virtualenv, really. The pysparse header files are now installed under pysparse/include in the lib/pythonX.Y directory. So this doesn't cause permission issues with virtual environments anymore. I also added a convenience function for packages that rely on pysparse: >>> import pysparse >>> pysparse.get_include() Let me know how that goes. -- Dominique |