The makefile attempts to run the tests with python2.4 regardless of the python in the environment.
So...doing a python setup.py install will install to the system python and, if that's not 2.4, the tests can't possibly pass since ftputil is not installed in python2.4.
The makefile should be modified to use the system python by default and possibly take a specific interpreter name to use on the command line.
There's just one test which is specifically for Python 2.4, the other tests are run with the default Python interpreter. From the makefile:
test: @echo "Tests for ftputil ${VERSION}\n" python2.4 _test_python2_4.py for file in $(TEST_FILES); \ do \ echo $$file ; \ python $$file ; \ done
In fact when you run the tests, the one test mentioned explicitly tries to use
python2.4
. It seems that when I coded this, I only thought about myself and forgot other developers who might want to run the tests without having Python 2.4 installed.To make a long story short: I think Python 2.4 is only used for one test, not all of them, but still the
test
target should be changed to only run this test if Python 2.4 is installed (and maybe print a warning otherwise).
Yes, I just moved it to a different target; test_24 in the makefile, and I printed out the current system python.
You can see what I did when you pull my changes off BitBucket?.
Since changeset 1124eb01fd93b4601afabaf3c954f5c3117f2c3e the test for Python 2.4 is only run if the interpreter is in the execution path.