|
|
|
@ -18,47 +18,20 @@
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
from os import path
|
|
|
|
|
import glob
|
|
|
|
|
from glob import glob
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
import distutils
|
|
|
|
|
from distutils.core import setup
|
|
|
|
|
from distutils.command.install_data import install_data
|
|
|
|
|
|
|
|
|
|
data_files = []
|
|
|
|
|
|
|
|
|
|
var_data_files = []
|
|
|
|
|
|
|
|
|
|
__version__ = "3.1.8"
|
|
|
|
|
__version__ = "3.2.2"
|
|
|
|
|
__app__ = "calculate-console"
|
|
|
|
|
|
|
|
|
|
class cl_console_data(install_data):
|
|
|
|
|
def run (self):
|
|
|
|
|
install_data.run(self)
|
|
|
|
|
data_file = []
|
|
|
|
|
fileNames = map(lambda x: path.split(x[0])[1], data_file)
|
|
|
|
|
listNames = map(lambda x: filter(lambda y: y, x[0].split("/")),
|
|
|
|
|
data_file)
|
|
|
|
|
data_find = {}
|
|
|
|
|
for i in range(len(fileNames)):
|
|
|
|
|
listNames[i].reverse()
|
|
|
|
|
data_find[fileNames[i]] =[listNames[i],data_file[i][1]]
|
|
|
|
|
|
|
|
|
|
for path in self.get_outputs():
|
|
|
|
|
nameFile = path.split(path)[1]
|
|
|
|
|
if nameFile in data_find.keys():
|
|
|
|
|
data = data_find[nameFile][0]
|
|
|
|
|
mode = data_find[nameFile][1]
|
|
|
|
|
flagFound = True
|
|
|
|
|
iMax = len(data)
|
|
|
|
|
pathFile = path
|
|
|
|
|
for i in range(iMax):
|
|
|
|
|
if data[i] != path.split(pathFile)[1]:
|
|
|
|
|
flagFound = False
|
|
|
|
|
break
|
|
|
|
|
pathFile = path.split(pathFile)[0]
|
|
|
|
|
if flagFound:
|
|
|
|
|
os.chmod(path, mode)
|
|
|
|
|
packages = [
|
|
|
|
|
"calculate."+str('.'.join(root.split(os.sep)[1:]))
|
|
|
|
|
for root, dirs, files in os.walk('pym/console')
|
|
|
|
|
if '__init__.py' in files
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
setup(
|
|
|
|
|
name = __app__,
|
|
|
|
@ -68,10 +41,7 @@ setup(
|
|
|
|
|
author_email = "support@calculate.ru",
|
|
|
|
|
url = "http://calculate-linux.org",
|
|
|
|
|
license = "http://www.apache.org/licenses/LICENSE-2.0",
|
|
|
|
|
data_files = data_files,
|
|
|
|
|
package_dir = {'calculate.console': "console"},
|
|
|
|
|
packages = ['calculate.console','calculate.console.variables',
|
|
|
|
|
'calculate.console.application'],
|
|
|
|
|
scripts = ['./scripts/cl-console','./scripts/cl-consoled'],
|
|
|
|
|
cmdclass={'cl_console_data': cl_console_data}
|
|
|
|
|
package_dir = {'calculate.console': "pym/console"},
|
|
|
|
|
packages = packages,
|
|
|
|
|
scripts = (glob('bin/*')),
|
|
|
|
|
)
|
|
|
|
|