Bump version (incompatilibity: dropping old Pythons).
[texml.git] / setup.py
1 import sys
2 from distutils.core import setup
3 import os.path
4 import re
5 import glob
6
7
8 def get_version():
9     # Take the version from "scripts/texml.py"
10     version    = None
11     version_re = re.compile('^VERSION[^"]*"([^"]+)"; # GREPVERSION')
12     f = open(os.path.join('scripts', 'texml.py'))
13     for line in f:
14       match = version_re.search(line)
15       if match:
16         version = match.group(1)
17         break
18     f.close()
19     if None == version:
20       raise "Can't find version"
21     return version
22
23
24 version = get_version()
25
26 setup(name="texml",
27     version= version ,
28     description="Convert TeXML to LaTeX or ConTeXt",
29     long_description = """TeXML is an XML syntax for TeX. The processor transforms the TeXML markup into the TeX markup, escaping special and out-of-encoding characters. The intended audience is developers who automatically generate [La]TeX or ConTeXt files.""",
30     author="Oleg Parashchenko, Paul Tremblay",
31     author_email="olpa@ http://uucode.com/",
32     license = 'MIT',
33     url = 'http://getfo.org/texml/',
34     packages=['Texml'],
35     scripts=['scripts/texml.py', 'scripts/texml'],
36     data_files=[
37       ('share/man/man1', ['docs/texml.1']),
38       ('share/doc/texml-%s' % version,
39         glob.glob(os.path.join('docs', '*.html')) +
40         glob.glob(os.path.join('docs', '*.css'))  +
41         glob.glob(os.path.join('docs', '*.png')))
42     ]
43   )
44