This may work. Assuming Python is in the path you can do either: python -c "import sys; print sys.prefix+'/include/python'+sys.version[:3]"
or python -c "import sys; print '~/.nix-profile/include/include/python'+sys.version[:3]" depending on need. Pj. On Tue, Jun 03, 2008 at 12:09:37AM +0200, Ludovic Courtès wrote: > Hi, > > [EMAIL PROTECTED] (Pjotr Prins) writes: > > > When writing code I need to find Python.h. What is the best way of > > doing that in Nix (note: this is *not* to build a package). > > For packages that (correctly) use Autoconf, you can pass `CPPFLAGS' and > `LDFLAGS' to the `configure' script, as in: > > $ CPPFLAGS="-I$HOME/.nix-profile/include" \ > LDFLAGS="-L$HOME/.nix-profile/lib" \ > ./configure ... > > Otherwise, you can define $C_INCLUDE_PATH, which is honored by `cpp', > and $LIBRARY_PATH, which is honored by GCC at link-time. > > There are also Nix-specific environment variables whose name I always > forget... > > Thanks, > Ludovic. > > _______________________________________________ > nix-dev mailing list > [email protected] > https://mail.cs.uu.nl/mailman/listinfo/nix-dev -- mobile nr: 0651172281 (work) _______________________________________________ nix-dev mailing list [email protected] https://mail.cs.uu.nl/mailman/listinfo/nix-dev
