configure and make for distutils

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christopher De Vries

    #1

    configure and make for distutils

    The predominant operating system in my workplace is Solaris, with a bit
    of Linux and MacOS X thrown in. As such people expect to install new
    software with the sequence:

    ../configure
    make
    make install

    I've written some python modules and scripts which I packaged as a
    source distribution with distutils and sent it to some of my colleagues
    so they could use the software, but despite the fact that I included
    instructions on how to install the software (namely: type "python
    setup.py install") I still heard back from several of them asking,
    "Where is the configure script?" or "How do you compile this thing?"
    Usually python is installed on their computers, but they have no
    experience installing python packages and do not seem to read
    installation instructions.

    In order to make installation seem more familiar for unix users I have
    written a configure script that checks the path for python, optionally
    checks the python version number, and checks to see if distutils is
    installed. It will optionally check if other modules are installed by
    trying "import" on them. The configure script is written in shell
    script and works under Linux and Solaris (though it uses echo -n which
    means no newline on Linux and apparently nothing under Solaris). It
    writes a Makefile which will run the appropriate distutils functions.
    Now unix users can run

    ../configure
    make
    make install

    without realizing that distutils and python are running under the hood.

    The script is available from my rarely used blog at


    Parts of the configure file where copied from an autoconf generated
    configure file. The section that checks for a program in the PATH and
    handles arguments and help are directly copied from a configure script.
    Please let me know if you think this script is useful and I will be
    happy to accept any edits anyone might have.

    Chris

Working...