Opened 9 years ago

Closed 8 years ago

#47 closed defect (fixed)

makefile has python 2.4 hardcoded, should default to system python

Reported by: ssteiner Owned by: schwa
Priority: major Milestone: 2.5
Component: Library Version: 2.4.2
Keywords: Cc: ssteinerX@…


The makefile attempts to run the tests with python2.4 regardless of the python in the environment.

So...doing a python 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.

Change History (3)

comment:1 Changed 9 years ago by schwa

  • Status changed from new to assigned

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:

        @echo "Tests for ftputil ${VERSION}\n"
        for file in $(TEST_FILES); \
        do \
                echo $$file ; \
                python $$file ; \

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).

comment:2 Changed 9 years ago by ssteiner

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?.

comment:3 Changed 8 years ago by schwa

  • Resolution set to fixed
  • Status changed from assigned to closed

Since changeset [bf6c26a5a1fe] the test for Python 2.4 is only run if the interpreter is in the execution path.

Note: See TracTickets for help on using tickets.