You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
815 B

  1. #!/usr/bin/env python
  2. from distutils.command.build import build
  3. from distutils.core import setup
  4. import os
  5. import sys
  6. libext = dict(darwin='.dylib').get(sys.platform, '.so')
  7. class my_build(build):
  8. def run(self):
  9. build.run(self)
  10. if not self.dry_run:
  11. os.spawnlp(os.P_WAIT, 'sh', 'sh', '-c', 'cd .. && mkdir build && cd build && cmake .. && make')
  12. self.copy_file(os.path.join('..', 'build', 'src', 'libdecaf.0' + libext), os.path.join(self.build_lib, 'edgold', 'libdecaf.so'))
  13. cmdclass = {}
  14. cmdclass['build'] = my_build
  15. setup(name='edgold',
  16. version='1.0',
  17. description='The Ed ECC Goldilocks Python wrapper',
  18. author='John-Mark Gurney',
  19. author_email='jmg@funkthat.com',
  20. #url='',
  21. cmdclass=cmdclass,
  22. packages=['edgold', ],
  23. )