471,049 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

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:

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

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.


Jul 18 '05 #1
0 1623

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Lonnie Princehouse | last post: by
1 post views Thread by Mathieu Malaterre | last post: by
15 posts views Thread by Colin J. Williams | last post: by
reply views Thread by Maarten Sneep | last post: by
1 post views Thread by George van den Driessche | last post: by
6 posts views Thread by ajikoe | last post: by
reply views Thread by Norman Khine | last post: by
7 posts views Thread by vedrandekovic | last post: by
reply views Thread by newbie73 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.