Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Jajcus/pyxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacek Konieczny <jajcus@jajcus.net>2005-02-27 19:30:41 +0300
committerJacek Konieczny <jajcus@jajcus.net>2005-02-27 19:30:41 +0300
commit67595c35308172294113d2a2bafcf345da21d4c8 (patch)
tree844ddd3f4cddb8a9d6442ebdfbd2273c6aad95d2 /setup.py
parente700ea9fdebeac1f90da07f46de77b38bee3ad22 (diff)
- optional python-only build
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py32
1 files changed, 21 insertions, 11 deletions
diff --git a/setup.py b/setup.py
index 9d7fb69..cbda5c9 100755
--- a/setup.py
+++ b/setup.py
@@ -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',