configure and make for distutils

  • Thread starter Christopher De Vries
  • Start date
C

Christopher De Vries

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
http://miyu.idolstarastronomer.com:8080/cgi-bin/cgiwrap/devries/blosxom.cgi/2004/11/22#pyconfig

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top