old_contents: {
    'variables': 
    {
    },
    
    'targets': 
    [{
      'target_name': 'ircd',
      'dependencies': 
      [
        'jsoncpp/jsoncpp.gyp:jsoncpp',
        'libuv/uv.gyp:uv',
      ],
      'type': 'executable',
      'include_dirs': 
      [
        'include',
      ],
      'sources': 
      [
        'common.gypi',
        'include/config.h',
        'include/configsection.h',
        'include/connection.h',
        'include/generalsection.h',
        'include/listener.h',
        'include/listenersection.h',
        'include/logging.h',
        'include/loggingsection.h',
        'include/parser.h',
        'include/stdinc.h',
        'include/system.h',
        'include/python/pythonwrap.h',
        'src/config.cc',
        'src/connection.cc',
        'src/generalsection.cc',
        'src/listener.cc',
        'src/listenersection.cc',
        'src/logging.cc',
        'src/loggingsection.cc',
        'src/main.cc',
        'src/parser.cc',
        'src/system.cc',
        'src/python/pythonwrap.cc',
      ],
      'msvs_settings':
      {
        'VCLinkerTool':
        {
          'AdditionalLibraryDirectories': 'c:/python27/libs',
        },
      },
      'conditions': 
      [
  	  [ 
  		'OS=="win"', 
  		{
  		  'defines': 
  		  [
  			'_WIN32_WINNT=0x0600',
  			'_GNU_SOURCE',
  		  ],
  		  'include_dirs':
  		  [
  		    'c:/python27/include',
  		  ],
  		  'libraries': 
  		  [ 
  		    'python27.lib' 
  		  ],
  		},
  		{
  		  'include_dirs':
  		  [
  		    '/usr/include/python2.6',
  		  ],
  		  'cflags': 
  		  [ 
  		    '-std=c++0x', 
  		    '-Wall', 
  		    '-Wextra', 
  		    '-pedantic', 
  		    '-Wno-long-long', 
  		    '-Wno-unused-parameter' 
  		  ],
  	    'defines': 
  	    [ 
  	      '_GNU_SOURCE' 
  	    ],
   		  'libraries': 
  		  [ 
  		    '-lpython2.6' 
  		  ],
  	  }
  	  ],
  	], 
    }]
  }
  
new_contents: {
    'variables': 
    {
      'python-includes': 'python -c "from distutils import sysconfig; print sysconfig.get_python_inc()"',
      'python-version': 'python -c "from distutils import sysconfig; print sysconfig.get_python_version()"',
    },
    
    'targets': 
    [{
      'target_name': 'ircd',
      'dependencies': 
      [
        'jsoncpp/jsoncpp.gyp:jsoncpp',
        'libuv/uv.gyp:uv',
      ],
      'type': 'executable',
      'include_dirs': 
      [
        'include',
        '<!@(<(python-includes))',
      ],
      'sources': 
      [
        'common.gypi',
        'include/config.h',
        'include/configsection.h',
        'include/connection.h',
        'include/generalsection.h',
        'include/listener.h',
        'include/listenersection.h',
        'include/logging.h',
        'include/loggingsection.h',
        'include/parser.h',
        'include/stdinc.h',
        'include/system.h',
        'include/python/pythonwrap.h',
        'src/config.cc',
        'src/connection.cc',
        'src/generalsection.cc',
        'src/listener.cc',
        'src/listenersection.cc',
        'src/logging.cc',
        'src/loggingsection.cc',
        'src/main.cc',
        'src/parser.cc',
        'src/system.cc',
        'src/python/pythonwrap.cc',
      ],
      'conditions': 
      [
  	  [ 
  		'OS=="win"', 
  		{
        'variables':
        {
          'python-binlibdest': 'python -c "from distutils import sysconfig; print sysconfig.get_config_var("BINLIBDEST")"',
        },
        'msvs_settings':
        {
          'VCLinkerTool':
          {
            'AdditionalLibraryDirectories': '<!@(<(python-binlibdest))s',
          },
        },
  		  'defines': 
  		  [
  			'_WIN32_WINNT=0x0600',
  			'_GNU_SOURCE',
  		  ],
  		  'libraries': 
  		  [ 
  		    'python<!@(<(python-version)).lib'
  		  ],
  		},
  		{
  		  'cflags': 
  		  [ 
  		    '-std=c++0x', 
  		    '-Wall', 
  		    '-Wextra', 
  		    '-pedantic', 
  		    '-Wno-long-long', 
  		    '-Wno-unused-parameter' 
  		  ],
  	    'defines': 
  	    [ 
  	      '_GNU_SOURCE' 
  	    ],
   		  'libraries': 
  		  [ 
  		    '-lpython<!@(<(python-version))'
  		  ],
  	  }
  	  ],
  	], 
    }]
  }
  
subject: make gyp a bit more python generic