#!/usr/bin/env python

# Copyright (c) 2015, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/scri/blob/master/LICENSE>

import distutils.core
from auto_version import calculate_version, build_py_copy_version


distutils.core.setup(name='scri',
                     version=calculate_version(),
                     description='Manipulating time-dependent functions of spin-weighted spherical harmonics',
                     author='Michael Boyle',
                     author_email='mob22@cornell.edu',
                     url='https://github.com/moble/scri',
                     package_dir={'scri': '.'},
                     packages=['scri', 'scri.pn', 'scri.SpEC'],
                     requires=['numpy', 'scipy', 'quaternion', 'spherical_functions'],
                     cmdclass={'build_py': build_py_copy_version},
                     )

@@ -39,9 +39,9 @@
  201
-5
+7
 , Mi
@@ -110,20 +110,26 @@
 m/moble/
-scri
+quaternion
 /blob/ma
@@ -147,47 +147,137 @@
 E%3E%0A%0A
-import distutils.core%0Afrom auto
+# Construct the version number from the date and time this python version was created.%0Afrom os import environ%0Aif %22package
 _version
  imp
@@ -276,154 +276,865 @@
 sion
+%22
  i
-mport calculate_version, build_py_copy_version%0A%0A%0Adistutils.core.setup(name='scri',%0A                     version=calculate_version(),%0A           
+n environ:%0A    version = environ%5B%22package_version%22%5D%0A    print(%22Setup.py using environment version='%7B0%7D'%22.format(version))%0Aelse:%0A    print(%22The variable 'package_version' was not present in the environment%22)%0A    try:%0A        from subprocess import check_output%0A        version = check_output(%22%22%22git log -1 --format=%25cd --date=format:'%25Y.%25m.%25d.%25H.%25M.%25S'%22%22%22, shell=use_shell).decode('ascii').rstrip()%0A        print(%22Setup.py using git log version='%7B0%7D'%22.format(version))%0A    except:%0A        from time import strftime, gmtime%0A        version = strftime(%22%25Y.%25m.%25d.%25H.%25M.%25S%22, gmtime())%0A        print(%22Setup.py using strftime version='%7B0%7D'%22.format(version))%0Awith open('_version.py', 'w') as f:%0A    f.write('__version__ = %22%7B0%7D%22'.format(version))%0A%0A%0Aif __name__ == %22__main__%22:%0A    from distutils.core import setup%0A    setup(name='scri',%0A          version=version,%0A
     
@@ -1231,33 +1231,69 @@
 ics',%0A          
- 
+url='https://github.com/moble/scri',%0A
           author
@@ -1320,27 +1320,16 @@
         
-     
-      
 author_e
@@ -1358,77 +1358,8 @@
 u',%0A
-                     url='https://github.com/moble/scri',%0A           
     
@@ -1401,27 +1401,16 @@
         
-  
-         
 packages
@@ -1454,27 +1454,16 @@
         
-         
-  
 requires
@@ -1524,92 +1524,8 @@
 '%5D,%0A
-                     cmdclass=%7B'build_py': build_py_copy_version%7D,%0A                 
     

Remove old setup