Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --------config.py:
- deps = CFG.main()
- if deps:
- basepath = None
- for d in deps:
- prepdep(d, basepath)
- writesetupfile(deps, basepath, additional_platform_setup)
- print_("""\nIf you get compiler errors during install, doublecheck
- the compiler flags in the "Setup" file.\n""")
- else:
- print_("""\nThere was an error creating the Setup file, check for errors
- or make a copy of "Setup.in" and edit by hand.""")
- if __name__ == '__main__': main()
- ------config_unix.py:
- class DependencyPython:
- def __init__(self, name, module, header):
- self.name = name
- self.lib_dir = ''
- self.inc_dir = ''
- self.libs = []
- self.cflags = ''
- self.found = 0
- self.ver = '0'
- self.module = module
- self.header = header
- def configure(self, incdirs, libdirs):
- self.found = 1
- if self.module:
- try:
- self.ver = __import__(self.module).__version__
- COMPILE Result:
- Traceback (most recent call last):
- File "config.py", line 173, in <module>
- if __name__ == '__main__': main()
- File "config.py", line 161, in main
- deps = CFG.main()
- File "/wrkdirs/usr/ports/devel/py-pygame/work-py27/pygame-1.9.4/config_unix.py", line 232, in main
- d.configure(incdirs, libdirs)
- AttributeError: 'NoneType' object has no attribute 'configure'
- *** Error code 1
- Stop.
- make: stopped in /usr/ports/devel/py-pygame
- build of devel/py-pygame | py-pygame-1.9.4 ended at Fri Jul 20 16:42:03 CDT 2018
- build time: 00:00:15
- !!! build failure encountered !!!
- [00:00:19] Error: Build failed in phase: configure
- [00:00:19] Cleaning up
- [00:00:19] Unmounting file systems
- The part I changed was :
- DEPS = [
- DependencyProg('SDL', 'SDL_CONFIG', 'sdl-config', '1.2', ['sdl']),
- Dependency('FONT', 'SDL_ttf.h', 'libSDL_ttf.so', ['SDL_ttf']),
- Dependency('IMAGE', 'SDL_image.h', 'libSDL_image.so', ['SDL_image']),
- Dependency('MIXER', 'SDL_mixer.h', 'libSDL_mixer.so', ['SDL_mixer']),
- Dependency('PNG', 'png.h', 'libpng', ['png']),
- Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']),
- Dependency('SCRAP', '', 'libX11', ['X11']),
- Dependency('PORTMIDI', 'portmidi.h', 'libportmidi.so', ['portmidi']),
- porttime_dep,
- find_freetype(),
- #Dependency('GFX', 'SDL_gfxPrimitives.h', 'libSDL_gfx.so', ['SDL_gfx']),
- ]
- if not DEPS[0].found:
- sys.exit('Unable to run "sdl-config". Please make sure a development version of SDL is installed.')
- 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
- 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