--- setup.py +++ setup.py @@ -3,10 +3,18 @@ from distutils.command.install import install from distutils.core import setup -headers = (glob( os.path.join( "CXX","*.hxx" ) ) - +glob( os.path.join( "CXX","*.h" ) )) -sources = (glob( os.path.join( "Src", "*.cxx" ) ) - +glob( os.path.join( "Src", "*.c" ) )) +headers = (glob( os.path.join( "CXX", "Python%s" % sys.version_info[0], "*.hxx" ) ) + +glob( os.path.join( "CXX", "Python%s" % sys.version_info[0], "*.h" ) )) +headers += [header for header in + glob( os.path.join( "CXX", "*.hxx" ) ) + + glob( os.path.join( "CXX", "*.h" ) ) + if os.path.sep.join((os.path.split(header)[0], "Python%s" % sys.version_info[0], os.path.split(header)[1])) not in headers] +sources = (glob( os.path.join( "Src", "Python%s" % sys.version_info[0], "*.cxx" ) ) + +glob( os.path.join( "Src", "Python%s" % sys.version_info[0], "*.c" ) )) +sources += [source for source in + glob( os.path.join( "Src", "*.cxx" ) ) + + glob( os.path.join( "Src", "*.c" ) ) + if os.path.sep.join((os.path.split(source)[0], "Python%s" % sys.version_info[0], os.path.split(source)[1])) not in sources] class my_install (install):