setup.py

changeset 7804
1cbc27e34ec6
parent 7800
96fae5353698
child 7807
5514ca6a62ca
equal deleted inserted replaced
7803:97f77d69c6f0 7804:1cbc27e34ec6
12 import sys 12 import sys
13 import subprocess # secok 13 import subprocess # secok
14 import shutil 14 import shutil
15 import fnmatch 15 import fnmatch
16 import datetime 16 import datetime
17 import json
17 18
18 from setuptools import setup, find_packages 19 from setuptools import setup, find_packages
20
21 installInfoName = "eric6installpip.json"
19 22
20 ###################################################################### 23 ######################################################################
21 ## some helper functions below 24 ## some helper functions below
22 ###################################################################### 25 ######################################################################
23 26
239 @param dirName name of the directory to compile UI files for (string) 242 @param dirName name of the directory to compile UI files for (string)
240 """ 243 """
241 from PyQt5.uic import compileUiDir 244 from PyQt5.uic import compileUiDir
242 compileUiDir(dirName, True, __pyName) 245 compileUiDir(dirName, True, __pyName)
243 246
247
248 def createInstallInfoFile(dirName):
249 """
250 Create a file containing some rudimentary install information.
251
252 @param dirName name of the directory to compile UI files for
253 @type str
254 """
255 global installInfoName
256
257 installInfo = {
258 "sudo": False,
259 "user": "",
260 "exe": "",
261 "argv": "",
262 "eric": "",
263 "virtualenv": False,
264 "installed": False,
265 "guessed": False,
266 "edited": False,
267 "pip": True,
268 "remarks": "",
269 }
270 with open(os.path.join(dirName, installInfoName), "w") as infoFile:
271 json.dump(installInfo, infoFile, indent=2)
272
244 ###################################################################### 273 ######################################################################
245 ## setup() below 274 ## setup() below
246 ###################################################################### 275 ######################################################################
247 276
248 Version = getVersion() 277 Version = getVersion()
255 print("preparing the sources...") # __IGNORE_WARNING_M801__ 284 print("preparing the sources...") # __IGNORE_WARNING_M801__
256 cleanupSource(sourceDir) 285 cleanupSource(sourceDir)
257 compileUiFiles(sourceDir) 286 compileUiFiles(sourceDir)
258 prepareInfoFile(infoFileName, Version) 287 prepareInfoFile(infoFileName, Version)
259 prepareAppdataFile(appdataFileName, Version) 288 prepareAppdataFile(appdataFileName, Version)
289 createInstallInfoFile(sourceDir)
260 print("Preparation finished") # __IGNORE_WARNING_M801__ 290 print("Preparation finished") # __IGNORE_WARNING_M801__
261 291
262 setup( 292 setup(
263 name="eric-ide", 293 name="eric-ide",
264 version=Version, 294 version=Version,
321 [".png", ".svg", ".svgz", ".xpm", ".ico", ".gif", ".icns", ".txt", 351 [".png", ".svg", ".svgz", ".xpm", ".ico", ".gif", ".icns", ".txt",
322 ".tmpl", ".html", ".qch", ".css", ".qss", ".e4h", ".e6h", ".api", 352 ".tmpl", ".html", ".qch", ".css", ".qss", ".e4h", ".e6h", ".api",
323 ".bas", ".dat", ".xbel", ".xml", ".js"] 353 ".bas", ".dat", ".xbel", ".xml", ".js"]
324 ) + ["i18n/eric6_de.qm", "i18n/eric6_en.qm", "i18n/eric6_es.qm", 354 ) + ["i18n/eric6_de.qm", "i18n/eric6_en.qm", "i18n/eric6_es.qm",
325 "i18n/eric6_ru.qm", 355 "i18n/eric6_ru.qm",
356 installInfoName,
326 ] 357 ]
327 }, 358 },
328 entry_points={ 359 entry_points={
329 "gui_scripts": [ 360 "gui_scripts": [
330 "eric6 = eric6.eric6:main", 361 "eric6 = eric6.eric6:main",

eric ide

mercurial