Commits

Mike Steder  committed 0e79325

Migrating to distribute/setuptools and removing dependency on simplejson.

  • Participants
  • Parent commits eaff9dd

Comments (0)

Files changed (2)

 #!/usr/bin/env python
 
-from distutils.core import setup
+import distribute_setup
+distribute_setup.use_setuptools()
+
+from setuptools import setup
+
 
 setup(name='txProject',
       version='1.0.0a1',
       author_email='steder@gmail.com',
       url='http://bitbucket.org/steder/txproject',
       packages=['txproject',],
-      scripts=['bin/dirprinter', 'bin/txproject']
+      scripts=['bin/dirprinter', 'bin/txproject'],
      )

File txproject/template.py

 """
 
 import os
-import simplejson
+try:
+    import json
+except ImportError:
+    import simplejson as json
+
 
 
 DEFAULT_TEMPLATE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "templates")
         self.templates = {}
         if self.template_dir is not None:
             tocFile = open(os.path.join(self.template_dir, "index.json"), "r")
-            toc = simplejson.load(
+            toc = json.load(
                 tocFile
             )
             for templateName in toc: