diff options
| author | Arslaan Pathan <[email protected]> | 2026-01-21 22:17:24 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-01-21 22:17:24 +1300 |
| commit | be433efc29016d20e94521baee8bbe326e889560 (patch) | |
| tree | 1173459431b2091ace8edb6437d66c60a5c48a3a | |
| parent | 1205f476a04327530e2e532e201da5bbb9917d9d (diff) | |
| download | python-0.9.1-patched-QoL-be433efc29016d20e94521baee8bbe326e889560.tar.xz python-0.9.1-patched-QoL-be433efc29016d20e94521baee8bbe326e889560.zip | |
Fix issues with PYTHONPATH and make install
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | src/Makefile | 10 |
2 files changed, 9 insertions, 4 deletions
@@ -10,6 +10,7 @@ This repository is a patched version of Python 0.9.1 which fixes the multiplicat - Fixed int_mul integer overflow bug in src/intobject.c on 64-bit systems - Added -std=c89 to CFLAGS in Makefile for compatibility with GCC 15+ - Added a `make install` target that installs to /opt/python091 by default (python is at /opt/python091/bin/py091), this can be changed with the INSTALL_DIR env variable. +- Fixed PYTHONPATH to be relative to the INSTALL_DIR used in `make install` target ## Some tips to get you started @@ -18,6 +19,6 @@ This repository is a patched version of Python 0.9.1 which fixes the multiplicat 2. The `os` module does not exist here; use `posix` instead. 3. The singular `=` sign is used for both assignment AND comparison (a nightmare, I know.) 4. Some things may be unstable, it is not fully tested. I'll have to read through the whole codebase later. - +5. If you cannot import modules from the standard library, try setting the PYTHONPATH environment variable to the location of the `lib` directory. For example, to use a standard library from ~/py091/lib, run the command like this: `PYTHONPATH=~/py091/lib /path/to/python **args` > Original README is at README.original diff --git a/src/Makefile b/src/Makefile index 6308b45..6d5280d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -70,7 +70,12 @@ RANLIB = ranlib # For BSD # the interpreter from the source/build directory as distributed will # find the library (admittedly a hack). -DEFPYTHONPATH= .:/usr/local/lib/python:/ufs/guido/lib/python:../lib +# patched by Arslaan Pathan, 2026-01-21 +# change DEFPYTHONPATH to the default INSTALL_DIR +# used in the make install target I added at the +# end of the file. +INSTALL_DIR="/opt/python091" +DEFPYTHONPATH= .:$(INSTALL_DIR)/lib:../lib # For "Pure" BSD Systems @@ -518,8 +523,7 @@ glmodule.c: cstubs cgen # make install target added by Arslaan Pathan # 2026-01-21 # installs into /opt/python091 by default - -INSTALL_DIR = /opt/python091 +# INSTALL_DIR is defined above, next to DEFPYTHONPATH install: python install -d $(INSTALL_DIR) |
