code_junkie

How can I add post-install scripts to easy_install / setuptools / distutils?

Nov 12th, 2011
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3. from setuptools import setup
  4.  
  5. version = __import__('pysmell.pysmell').pysmell.__version__
  6.  
  7. setup(
  8. name='pysmell',
  9. version = version,
  10. description = 'An autocompletion library for Python',
  11. author = 'Orestis Markou',
  12. author_email = '[email protected]',
  13. packages = ['pysmell'],
  14. entry_points = {
  15. 'console_scripts': [ 'pysmell = pysmell.pysmell:main' ]
  16. },
  17. data_files = [
  18. ('vim', ['pysmell.vim']),
  19. ('emacs', ['pysmell.el']),
  20. ],
  21. include_package_data = True,
  22. keywords = 'vim autocomplete',
  23. url = 'http://code.google.com/p/pysmell',
  24. long_description =
  25. """
  26. PySmell is a python IDE completion helper.
  27.  
  28. It tries to statically analyze Python source code, without executing it,
  29. and generates information about a project's structure that IDE tools can
  30. use.
  31.  
  32. The first target is Vim, because that's what I'm using and because its
  33. completion mechanism is very straightforward, but it's not limited to it.
  34. """,
  35. classifiers = [
  36. 'Development Status :: 5 - Production/Stable',
  37. 'Environment :: Console',
  38. 'Intended Audience :: Developers',
  39. 'License :: OSI Approved :: BSD License',
  40. 'Operating System :: OS Independent',
  41. 'Programming Language :: Python',
  42. 'Topic :: Software Development',
  43. 'Topic :: Utilities',
  44. 'Topic :: Text Editors',
  45. ]
  46.  
  47.  
  48. )
  49.  
  50. from setuptools.command.install import install as _install
  51.  
  52. class install(_install):
  53. def run(self):
  54. _install.run(self)
  55. print post_install_message
  56.  
  57. setup(
  58. cmdclass={'install': install},
  59. ...
Add Comment
Please, Sign In to add comment