root/setup.py

Revision 294:ee0f16515810, 2.8 KB (checked in by Andrew Davison <andrew.davison@…>, 3 months ago)

Javascript for smtweb was not being packaged and installed

Line 
1#!/usr/bin/env python
2
3import distribute_setup
4distribute_setup.use_setuptools()
5from setuptools import setup
6from distutils.command.sdist import sdist
7from src.__init__ import __version__
8import os
9
10
11class sdist_hg(sdist):
12    """Add revision number to version for development releases."""
13
14    def run(self):
15        if "dev" in self.distribution.metadata.version:
16            self.distribution.metadata.version += self.get_tip_revision()
17        sdist.run(self)
18
19    def get_tip_revision(self, path=os.getcwd()):
20        from mercurial.hg import repository
21        from mercurial.ui import ui
22        from mercurial import node
23        repo = repository(ui(), path)
24        tip = repo.changelog.tip()
25        return str(repo.changelog.rev(tip))
26
27
28setup(
29    name = "Sumatra",
30    version = __version__,
31    package_dir={'sumatra': 'src'},
32    packages = ['sumatra', 'sumatra.dependency_finder',
33                'sumatra.external', 'sumatra.datastore',
34                'sumatra.external.NeuroTools',
35                'sumatra.recordstore', 'sumatra.recordstore.django_store',
36                'sumatra.versioncontrol',
37                'sumatra.web', 'sumatra.web.templatetags'],
38    package_data = {'sumatra': ['web/media/*.css', 'web/media/*.js',
39                                'web/media/*.png', 'web/media/images/*.png',
40                                'web/templates/*.html']},
41    scripts = ['bin/smt', 'bin/smtweb'],
42    author = "Andrew P. Davison",
43    author_email = "andrewpdavison@gmail.com",
44    description = "A tool for automated tracking of computation-based scientific projects",
45    long_description = open('README').read(),
46    license = "CeCILL http://www.cecill.info",
47    keywords = "computational science neuroscience simulation analysis project-management",
48    url = "http://neuralensemble.org/sumatra/",
49    classifiers = ['Development Status :: 3 - Alpha',
50                   'Environment :: Console',
51                   'Environment :: Web Environment',
52                   'Intended Audience :: Science/Research',
53                   'License :: Other/Proprietary License',
54                   'Natural Language :: English',
55                   'Operating System :: OS Independent',
56                   'Programming Language :: Python',
57                   'Programming Language :: Python :: 2.5',
58                   'Programming Language :: Python :: 2.6',
59                   'Programming Language :: Python :: 2.7',
60                   'Topic :: Scientific/Engineering'],
61    cmdclass = {'sdist': sdist_hg},
62    install_requires = ['Django>=1.2', 'django-tagging', 'httplib2', 'simplejson'],
63    extras_require = {'svn': 'pysvn',
64                      'hg': 'mercurial',
65                      'git': 'GitPython',
66                      'bzr': 'bzrlib',
67                      'mpi': 'mpi4py'},
68    #test_suite = ?,
69    tests_require = ['twill'],
70    #use_2to3 = True,
71)
72
Note: See TracBrowser for help on using the browser.