DATA_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), 'datadir'))
here = lambda x: os.path.abspath(os.path.join(os.path.dirname(__file__), x))
DATA_DIR = here('datadir')
Python - how to refer to relative paths of resources when working with code repository