Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
ded9fa6231 |
|
|
@ -1,15 +1,48 @@
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import stat
|
||||||
|
import argparse
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
setup(name= 'TouchinBuild',
|
print sys.argv
|
||||||
version= '0.0.10',
|
parser = argparse.ArgumentParser()
|
||||||
packages= ['Core', 'Core.LineConveyor',
|
parser.add_argument('install')
|
||||||
'utils', 'utils.SettingsProvider',
|
args = parser.parse_known_args()[0]
|
||||||
'parser', 'parser.CopyParser', 'parser.BackupParser', 'parser.InsideParser', 'parser.SettingsParser',
|
|
||||||
'commands', 'commands.CleanBuildCommands',
|
packageName = 'TouchinBuild'
|
||||||
'CommandBuilders'],
|
version = '0.0.13'
|
||||||
|
|
||||||
|
setup(name= packageName,
|
||||||
|
version= version,
|
||||||
|
|
||||||
|
py_modules=['TouchinBuild.taskRunner'],
|
||||||
|
packages= ['TouchinBuild.Core', 'TouchinBuild.Core.LineConveyor',
|
||||||
|
'TouchinBuild.utils', 'TouchinBuild.utils.SettingsProvider',
|
||||||
|
'TouchinBuild.parsers', 'TouchinBuild.parsers.CopyParser', 'TouchinBuild.parsers.ParserBackup', 'TouchinBuild.parsers.InsideParser', 'TouchinBuild.parsers.SettingsParser',
|
||||||
|
'TouchinBuild.commands', 'TouchinBuild.commands.CleanBuildCommands',
|
||||||
|
'TouchinBuild.CommandBuilders'],
|
||||||
|
|
||||||
url = 'http://touchin.ru',
|
url = 'http://touchin.ru',
|
||||||
license = 'All rights reserved.',
|
license = 'BSD License',
|
||||||
description = 'Build tool for Touchin',
|
description = 'Build tool for Touchin',
|
||||||
author = 'Rustam Zaitov',
|
author = 'Rustam Zaitov',
|
||||||
author_email = 'rustam.zaitov@touchin.ru'
|
author_email = 'rustam.zaitov [at] touchin.ru',
|
||||||
|
maintainer= 'Rustam Zaitov',
|
||||||
|
maintainer_email='rustam.zaitov [at] touchin.ru',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if args.install == 'install':
|
||||||
|
libPath = os.path.join(sys.prefix, 'lib')
|
||||||
|
dirsNames = os.listdir(libPath)
|
||||||
|
pythonDir = [name for name in dirsNames if name.startswith('python')][0]
|
||||||
|
executable = os.path.join(libPath, pythonDir, 'site-packages', packageName, 'taskRunner.py')
|
||||||
|
|
||||||
|
symlink = '/usr/local/bin/tibuild'
|
||||||
|
try:
|
||||||
|
os.unlink(symlink)
|
||||||
|
except OSError:
|
||||||
|
print 'warning: symlink file {0} is not exist'.format(symlink)
|
||||||
|
|
||||||
|
st = os.stat(executable)
|
||||||
|
os.chmod(executable, st.st_mode | stat.S_IEXEC)
|
||||||
|
os.symlink(executable, symlink)
|
||||||
Loading…
Reference in New Issue