setup.py 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/usr/bin/env python
  2. from __future__ import with_statement
  3. from distutils.core import setup
  4. import os
  5. # Create symlink so that to use 'scripts' w/o '.py'
  6. link_name = 'cdiff'
  7. if os.path.exists(link_name):
  8. os.unlink(link_name)
  9. os.symlink('src/cdiff.py', link_name)
  10. with open('CHANGES') as changes:
  11. for change in changes:
  12. if change.startswith('Version '):
  13. version = change.split()[1]
  14. break
  15. changes.seek(0)
  16. with open('README.rst') as doc:
  17. long_description = doc.read() + changes.read()
  18. setup(
  19. name = 'cdiff',
  20. version = version,
  21. author = 'Matthew Wang',
  22. author_email = 'mattwyl@gmail.com',
  23. license = 'BSD-3',
  24. description = ('Term based tool to view colored, incremental diff in '
  25. 'unified format or side ' 'by side with auto pager'),
  26. long_description = long_description,
  27. keywords = 'colored incremental side-by-side diff',
  28. url = 'https://github.com/ymattw/cdiff',
  29. classifiers = [
  30. 'Development Status :: 4 - Beta',
  31. 'Topic :: Utilities',
  32. 'License :: OSI Approved :: BSD License',
  33. 'Environment :: Console',
  34. 'Intended Audience :: Developers',
  35. 'Operating System :: MacOS :: MacOS X',
  36. 'Operating System :: POSIX',
  37. 'Operating System :: Unix',
  38. 'Programming Language :: Python',
  39. ],
  40. package_dir = {'': 'src'},
  41. packages = [''],
  42. py_modules = ['cdiff'],
  43. scripts = [link_name],
  44. )