Advertisement
ndowens04

Untitled

Jul 20th, 2018
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.84 KB | None | 0 0
  1. --------config.py:
  2.  
  3.    deps = CFG.main()
  4.     if deps:
  5.         basepath = None
  6.         for d in deps:
  7.             prepdep(d, basepath)
  8.         writesetupfile(deps, basepath, additional_platform_setup)
  9.         print_("""\nIf you get compiler errors during install, doublecheck
  10. the compiler flags in the "Setup" file.\n""")
  11.     else:
  12.         print_("""\nThere was an error creating the Setup file, check for errors
  13. or make a copy of "Setup.in" and edit by hand.""")
  14.  
  15. if __name__ == '__main__': main()
  16.  
  17. ------config_unix.py:
  18.  
  19. class DependencyPython:
  20.     def __init__(self, name, module, header):
  21.         self.name = name
  22.         self.lib_dir = ''
  23.         self.inc_dir = ''
  24.         self.libs = []
  25.         self.cflags = ''
  26.         self.found = 0
  27.         self.ver = '0'
  28.         self.module = module
  29.         self.header = header
  30.  
  31.     def configure(self, incdirs, libdirs):
  32.         self.found = 1
  33.         if self.module:
  34.             try:
  35.                 self.ver = __import__(self.module).__version__
  36.  
  37.  
  38.  
  39. COMPILE Result:
  40.  
  41. Traceback (most recent call last):
  42.   File "config.py", line 173, in <module>
  43.     if __name__ == '__main__': main()
  44.   File "config.py", line 161, in main
  45.     deps = CFG.main()
  46.   File "/wrkdirs/usr/ports/devel/py-pygame/work-py27/pygame-1.9.4/config_unix.py", line 232, in main
  47.     d.configure(incdirs, libdirs)
  48. AttributeError: 'NoneType' object has no attribute 'configure'
  49. *** Error code 1
  50.  
  51. Stop.
  52. make: stopped in /usr/ports/devel/py-pygame
  53. build of devel/py-pygame | py-pygame-1.9.4 ended at Fri Jul 20 16:42:03 CDT 2018
  54. build time: 00:00:15
  55. !!! build failure encountered !!!
  56. [00:00:19] Error: Build failed in phase: configure
  57. [00:00:19] Cleaning up
  58. [00:00:19] Unmounting file systems
  59.  
  60. The part I changed was :
  61. DEPS = [
  62.         DependencyProg('SDL', 'SDL_CONFIG', 'sdl-config', '1.2', ['sdl']),
  63.         Dependency('FONT', 'SDL_ttf.h', 'libSDL_ttf.so', ['SDL_ttf']),
  64.         Dependency('IMAGE', 'SDL_image.h', 'libSDL_image.so', ['SDL_image']),
  65.         Dependency('MIXER', 'SDL_mixer.h', 'libSDL_mixer.so', ['SDL_mixer']),
  66.         Dependency('PNG', 'png.h', 'libpng', ['png']),
  67.         Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']),
  68.         Dependency('SCRAP', '', 'libX11', ['X11']),
  69.         Dependency('PORTMIDI', 'portmidi.h', 'libportmidi.so', ['portmidi']),
  70.         porttime_dep,
  71.         find_freetype(),
  72.         #Dependency('GFX', 'SDL_gfxPrimitives.h', 'libSDL_gfx.so', ['SDL_gfx']),
  73.     ]
  74.     if not DEPS[0].found:
  75.         sys.exit('Unable to run "sdl-config". Please make sure a development version of SDL is installed.')
  76.  
  77. I removed 1.2 and Changed DependencyProg to Dependency in First dep, which got rid of the Nonetype error, but gives sdl-config not found and I have it as a build dep
  78.  
  79. But even if I do that, and get rid of the code that prints the error, it'll go back to saying NoneType error
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement