I ended up with the following (leaving here for someone with the same trouble):
--- setup.py.orig 2011-03-23 11:30:58.000000000 +0300 +++ setup.py 2011-03-23 11:34:46.000000000 +0300 @@ -349,6 +349,14 @@ # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + try: + triplet = os.popen('dpkg-architecture -qDEB_HOST_MULTIARCH').readline()[:-1] + except EnvironmentError: + pass + else: + add_dir_to_list(self.compiler.library_dirs, '/usr/lib/%s' % triplet) + add_dir_to_list(self.compiler.include_dirs, '/usr/include/%s' % triplet) +
# Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files.
Apply: cd Python-2.7.1 patch ./setup.py /path/to/patches/python-setup.py-natty.diff
I ended up with the following (leaving here for someone with the same trouble):
--- setup.py.orig 2011-03-23 11:30:58.000000000 +0300
add_dir_ to_list( self.compiler. library_ dirs, '/usr/local/lib')
add_dir_ to_list( self.compiler. include_ dirs, '/usr/local/ include' ) 'dpkg-architect ure -qDEB_HOST_ MULTIARCH' ).readline( )[:-1] to_list( self.compiler. library_ dirs, '/usr/lib/%s' % triplet) to_list( self.compiler. include_ dirs, '/usr/include/%s' % triplet)
+++ setup.py 2011-03-23 11:34:46.000000000 +0300
@@ -349,6 +349,14 @@
# Ensure that /usr/local is always used
+ try:
+ triplet = os.popen(
+ except EnvironmentError:
+ pass
+ else:
+ add_dir_
+ add_dir_
+
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
Apply: patches/ python- setup.py- natty.diff
cd Python-2.7.1
patch ./setup.py /path/to/