A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-January/011897.html below:

[Python-Dev] PEP 229 checked in

[Python-Dev] PEP 229 checked inGuido van Rossum guido@digicool.com
Fri, 19 Jan 2001 17:06:03 -0500
I finally figured the best way to fix sys.path to find shared modules
built by setup.py.  At first I thought I had to add it to getpath.c,
but the problem is that the name is calculated by calling
distutils.util.get_platform(), and that requires a working Python
interpreter, so we'd end up with a chicken-or-egg situation.

So instead I added 5 lines to site.py, which tests for
os.name=='posix', then for sys.path[-1] ending in '/Modules' -- this
tests only succeeds when running from the build directory.  Then it
calls distutils.util.get_platform() and uses the result to calculate
the correct directory name, which is then appended to sys.path.

Yes, this slows down startup (it imports a large portion of the
distutils package), but I don't care -- after all this is mostly for
me so I can play with the interpreter right after I've built it,
right?

--Guido van Rossum (home page: http://www.python.org/~guido/)



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