remove unused definition
[docutils.git] / sandbox / paultremblay / python_interface / setup.py
blobd0127adc82f40f588c6168ec7625f4e9aaf1bc96
1 import sys, os, shutil, glob
2 from distutils.core import setup
4 def remove_build():
5 if os.path.isdir('build'):
6 shutil.rmtree('build')
8 # get the script name
9 def get_script_name():
10 return os.path.join('scripts', 'docutils_to_fo.py')
12 xsl_files = glob.glob('xsl_fo/*')
14 def remove_files(the_list):
15 for the_path in the_list:
16 os.remove(the_path)
18 if 'sdist' in sys.argv:
19 os.chdir('test_files')
20 rm_files = []
21 rm_files.extend(glob.glob('*.pdf'))
22 rm_files.extend(glob.glob('*.fo'))
23 rm_files.extend(glob.glob('*.xml'))
24 rm_files.extend(glob.glob('*.xsl'))
25 remove_files(rm_files)
26 os.chdir('..')
28 remove_build()
29 script_name = get_script_name()
31 setup(name="docutilsToFo",
32 version= '.6' ,
33 description="Convert Docutils to FO",
34 author="Paul Tremblay",
35 author_email="noone@nowhere.com",
36 license = 'GNU GPL',
37 # url = "http://rtf2xml.sourceforge.net/",
38 packages=['docutilsToFo'],
39 package_dir = {'docutilsToFo': 'docutilsToFo'},
40 package_data={'docutilsToFo': ['xsl_fo/*.xsl', 'valid/*.dtd', 'valid/*.rng', 'valid/*xsl']},
41 scripts=[script_name],