summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2011-05-11 09:19:06 -0500
committerSol Jerome <sol.jerome@gmail.com>2011-06-14 12:36:45 -0500
commit64a49246688d0e8cb1481497ebbceac104220eda (patch)
tree8d8ae65ce36ee7515a6bb95e7d490d032870fac7
parent564a0ae955286194094ea5e6eda0afb7f755ca91 (diff)
downloadbcfg2-64a49246688d0e8cb1481497ebbceac104220eda.tar.gz
bcfg2-64a49246688d0e8cb1481497ebbceac104220eda.tar.bz2
bcfg2-64a49246688d0e8cb1481497ebbceac104220eda.zip
setup: Don't include py3 libs in py2 setups
Including the python3 libraries when running distutils on python2 leads to syntax errors. Since the libraries are only imported conditionally, it is safe to exclude these libraries completely on setups where they are not needed. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
-rw-r--r--setup.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 52ec93d10..18590cc34 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,9 @@ from distutils.core import setup
from distutils.core import Command
from fnmatch import fnmatch
from glob import glob
+import os
import os.path
+import sys
class BuildDTDDoc (Command):
"""Build DTD documentation"""
@@ -113,6 +115,10 @@ try:
except ImportError:
pass
+py3lib = 'src/lib/Bcfg2Py3Incompat.py'
+if sys.hexversion < 0x03000000 and os.path.exists(py3lib):
+ os.remove(py3lib)
+
setup(cmdclass=cmdclass,
name="Bcfg2",
version="1.2.0pre2",
@@ -133,7 +139,7 @@ setup(cmdclass=cmdclass,
"Bcfg2.Server.Reports.reports.templatetags",
"Bcfg2.Server.Snapshots",
],
- package_dir = {'Bcfg2':'src/lib'},
+ package_dir = {'Bcfg2': 'src/lib'},
package_data = {'Bcfg2.Server.Reports.reports':['fixtures/*.xml',
'templates/*.html', 'templates/*/*.html',
'templates/*/*.inc' ] },