old_contents: from os.path import isfile, exists, dirname, abspath
  from os import mkdir
  
  def phpcpp_is_installed():
  	return isfile("/usr/include/phpcpp.h") \
  	and isfile("/usr/lib/libphpcpp.a") \
  	and isfile("/usr/lib/libphpcpp.so")
  
  def create_extension_dir(dir):
  	path = "%s/%s/" % (dirname(abspath(__file__)), dir)
  	if exists(path):
  		return False
  	else:	
  		mkdir(path)
  		return True
  
new_contents: from os.path import isfile, exists, dirname, abspath
  from os import mkdir
  
  def phpcpp_is_installed():
  
  	files = ["/usr/include/phpcpp.h", "/usr/lib/libphpcpp.a", "/usr/lib/libphpcpp.so"]
  
  	for file in files:
  		if not isfile(file):
  			return False
  
  	return True
  
  def create_extension_dir(ext_name):
  
  	path = "%s/%s/" % (dirname(abspath(__file__)), ext_name)
  
  	if not exists(path):
  		mkdir(path)
  		return True
  	else:	
  		return False
  
subject: Rewrite is_phpcpp_installed and create_extension_dir.