On Tuesday, July 9, 2002, at 04:37 , Michael Hudson wrote: > Why isn't it just > > ,----------------------------------------------------------------------- > | # python_build: (Boolean) if true, we're either building Python or > | # building an extension with an un-installed Python, so we use > | # different (hard-wired) directories. > | > | argv0_path = os.path.dirname(os.path.abspath(sys.executable)) > | landmark = os.path.join(argv0_path, "Modules", "Setup") > | > | python_build = os.path.isfile(landmark): > | > | del argv0_path, landmark > `----------------------------------------------------------------------- This won't work for one of the standard use cases: having multiple "build" subdirectories of the source directory (where you build for different platforms or some such). And on the other question: as of a week ago setup.py is also being used to build at least some of the MacPython extension modules. But as for MacPython the build tree and the install tree are one and the same there is no problem. And as to a general solution to the problem: how about parsing the Makefile that sits beside the interpreter? In all use cases (I think also in your example of build directories very far away over the hills) the Makefile will sit in the same directory as the interpreter. And the Makefile will have the srcdir variable that points to the source directory. And we have a makefile parser in distutils. -- - Jack Jansen <Jack.Jansen@oratrix.com> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman -
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4