diff options
author | Jacek Konieczny <jajcus@jajcus.net> | 2005-02-27 19:30:41 +0300 |
---|---|---|
committer | Jacek Konieczny <jajcus@jajcus.net> | 2005-02-27 19:30:41 +0300 |
commit | 67595c35308172294113d2a2bafcf345da21d4c8 (patch) | |
tree | 844ddd3f4cddb8a9d6442ebdfbd2273c6aad95d2 /setup.py | |
parent | e700ea9fdebeac1f90da07f46de77b38bee3ad22 (diff) |
- optional python-only build
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 32 |
1 files changed, 21 insertions, 11 deletions
@@ -4,6 +4,8 @@ import os.path import sys +python_only = False + if sys.hexversion<0x02030000: raise ImportError,"Python 2.3 or newer is required" @@ -11,10 +13,27 @@ if not os.path.exists(os.path.join("pyxmpp","version.py")): print >>sys.stderr,"You need to run 'make' to use pyxmpp from SVN" sys.exit(1) + execfile(os.path.join("pyxmpp","version.py")) from distutils.core import setup, Extension +if python_only: + ext_modules = None +else: + ext_modules = [ + Extension( + 'pyxmpp._xmlextra', + [ + 'ext/xmlextra.c', + ], + libraries = ['xml2'], + include_dirs = ['libxml2addon','/usr/include/libxml2','/usr/local/include/libxml2'], + extra_compile_args = ['-g2'], + ), + ] + + #-- Let distutils do the rest setup( #-- Package description @@ -37,17 +56,8 @@ setup( "Topic :: Software Development :: Libraries :: Python Modules", ], license = 'LGPL', - ext_modules = [ - Extension( - 'pyxmpp._xmlextra', - [ - 'ext/xmlextra.c', - ], - libraries = ['xml2'], - include_dirs = ['libxml2addon','/usr/include/libxml2','/usr/local/include/libxml2'], - extra_compile_args = ['-g2'], - ), - ], + ext_modules = ext_modules, + #-- Python modules packages = [ 'pyxmpp', |