Commit d531cf59 by Eric Coissac

--no commit message

parent 821e8b21
......@@ -18,21 +18,46 @@ except ImportError:
from distutils.command.build_scripts import build_scripts as ori_build_scripts
from distutils.command.build_scripts import first_line_re
from distutils.command.install_scripts import install_scripts as ori_install_scripts
from stat import ST_MODE
import os
import os.path
import re, sys
import glob
from os import path
class install_scripts(ori_install_scripts):
def remove_deprecated_script(self):
for f in DEPRECATED_SCRIPTS:
try:
ff = os.path.join(self.install_dir,f)
os.unlink(ff)
log.info('Removing deprecated unix command : %s (file : %s)' % (f,ff))
ff = os.path.join(self.build_dir,f)
os.unlink(ff)
except:
log.info('Unix command %s is not present' % f)
pass
def run(self):
self.remove_deprecated_script()
ori_install_scripts.run(self)
class build_scripts(ori_build_scripts):
def copy_scripts (self):
"""Copy each script listed in 'self.scripts'; if it's marked as a
Python script in the Unix way (first line matches 'first_line_re',
ie. starts with "\#!" and contains "python"), then adjust the first
line to refer to the current Python interpreter as we copy.
"""
"""
self.mkpath(self.build_dir)
outfiles = []
for script in self.scripts:
......@@ -168,6 +193,8 @@ FILTERSRC = 'textwrangler/filter'
SCRIPTS = glob.glob('%s/*.py' % SRC)
FILTERS = glob.glob('%s/*.py' % FILTERSRC)
DEPRECATED_SCRIPTS=["fastaComplement"]
def rootname(x):
return os.path.splitext(x.sources[0])[0]
......@@ -191,7 +218,7 @@ setup(name="OBITools",
scripts=SCRIPTS,
package_dir = {'': SRC},
packages=findPackage(SRC),
cmdclass = {'build_ext': build_ext,'build_scripts':build_scripts},
cmdclass = {'build_ext': build_ext,'build_scripts':build_scripts, 'install_scripts':install_scripts},
requires=['Cython (>=0.12)'],
zip_safe = False,
ext_modules=EXTENTION)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment