Next: , Previous: Invoking pyconf, Up: Top


4 Existing projects

Using pyconfigure with existing projects is easy. For example, if your project already has a setup.py script, there is no need to replace it with pyconfigure. In this case, the best way to proceed would be to run pyconf to copy all of the files into your project's directory. Next, you simply need to copy the contents of your setup.py script into setup.py.in. Be sure not to just overwrite the file directly! Inside setup.py.in you will see several strings like @PACKAGE_NAME@. These are strings that will be replaced by the configure script and they should remain as they are. Most of the contents of the standard setup function should have already been filled in through the information in the PKG-INFO file but if not, they can be filled in manually. The default setup.py.in script is otherwise very simple, meaning any extensions to it that you have written in your setup.py script can simply be copied in.

If your project does not yet have a setup.py script but it already has a Makefile, the process is even easier. Simply call pyconf with --prefer-make and the setup.py.in file that is generated in your project's directory will simply wrap your Makefile (just be sure not to pass the --overwrite option!).