forked from usnistgov/corr-sumatra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
68 lines (60 loc) · 2.95 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env python
from setuptools import setup
from distutils.command.sdist import sdist
import os
class sdist_hg(sdist):
"""Add revision number to version for development releases."""
def run(self):
if "dev" in self.distribution.metadata.version:
self.distribution.metadata.version += self.get_tip_revision()
sdist.run(self)
def get_tip_revision(self, path=os.getcwd()):
from mercurial.hg import repository
from mercurial.ui import ui
repo = repository(ui(), path)
tip = repo.changelog.tip()
return str(repo.changelog.rev(tip))
setup(
name = "Sumatra",
version = "0.7dev",
package_dir = {'sumatra': 'sumatra'},
packages = ['sumatra', 'sumatra.dependency_finder', 'sumatra.datastore',
'sumatra.recordstore', 'sumatra.recordstore.django_store',
'sumatra.versioncontrol', 'sumatra.formatting',
'sumatra.web', 'sumatra.web.templatetags',
'sumatra.publishing',
'sumatra.publishing.latex', 'sumatra.publishing.sphinxext'],
package_data = {'sumatra': ['web/media/css/*.css', 'web/media/js/*.js',
'web/media/img/*', 'web/media/css/*.css', 'web/media/extras/fontawesome/font/*',
'web/media/extras/fontawesome/sass/*', 'web/media/extras/fontawesome/css/*.css',
'web/templates/*.html',
'publishing/latex/sumatra.sty',
'formatting/latex_template.tex']},
scripts = ['bin/smt', 'bin/smtweb'],
author = "Sumatra authors and contributors",
author_email = "andrew.davison@unic.cnrs-gif.fr",
description = "A tool for automated tracking of computation-based scientific projects",
long_description = open('README').read(),
license = "CeCILL http://www.cecill.info",
keywords = "computational science simulation analysis project-management",
url = "http://neuralensemble.org/sumatra/",
classifiers = ['Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: Science/Research',
'License :: Other/Proprietary License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering'],
cmdclass = {'sdist': sdist_hg},
install_requires = ['Django>=1.4', 'django-tagging', 'httplib2',
'docutils', 'jinja2', 'parameters'],
extras_require = {'svn': 'pysvn',
'hg': 'mercurial',
'git': 'GitPython',
'bzr': 'bzr',
'mpi': 'mpi4py'}
)