Re: $srcdir and $datadir

2018-02-10 Thread Ben Finney via Python-list
Victor Porton writes: > I want my program to work both when it is installed (using $datadir) > and when it is not yet installed (using $srcdir). Given your descriptions of both those, I don't see how it can reliably work; the program will expect directories that may not exist. Why hard-code them

Re: $srcdir and $datadir

2018-02-10 Thread Victor Porton
First, I've already solved my problem using setuptools and pkg_resources.resource_stream() and an environment variable to specify the path to data files. Ben Finney wrote: > Victor Porton writes: > >> In GNU software written in C $srcdir and $datadir are accessible to C >> code through generat

Re: $srcdir and $datadir

2018-02-08 Thread Ben Finney
Victor Porton writes: > In GNU software written in C $srcdir and $datadir are accessible to C > code through generated config.h file. For what purpose? Given that the source may not be at that location after the program is compiled – especially, after the program is moved to a different machine