By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,729 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,729 IT Pros & Developers. It's quick & easy.

configure and make for distutils

P: n/a
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:8...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

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.