setup.py

branch
eric7
changeset 8314
e3642a6a1e71
parent 8288
809d5d5ac2ba
child 8318
962bce857696
equal deleted inserted replaced
8313:dac33c7fce07 8314:e3642a6a1e71
17 import json 17 import json
18 import contextlib 18 import contextlib
19 19
20 from setuptools import setup, find_packages 20 from setuptools import setup, find_packages
21 21
22 installInfoName = "eric6installpip.json" 22 installInfoName = "eric7installpip.json"
23 23
24 ###################################################################### 24 ######################################################################
25 ## some helper functions below 25 ## some helper functions below
26 ###################################################################### 26 ######################################################################
27 27
77 @rtype list of tuples of (str, list of str) 77 @rtype list of tuples of (str, list of str)
78 """ 78 """
79 if sys.platform.startswith('linux'): 79 if sys.platform.startswith('linux'):
80 dataFiles = [ 80 dataFiles = [
81 ('share/applications', [ 81 ('share/applications', [
82 'linux/eric6.desktop', 82 'linux/eric7.desktop',
83 'linux/eric6_browser.desktop', 83 'linux/eric7_browser.desktop',
84 ]), 84 ]),
85 ('share/icons', [ 85 ('share/icons', [
86 'eric6/icons/breeze-dark/eric.svg', 86 'eric7/icons/breeze-dark/eric.svg',
87 'eric6/icons/breeze-dark/ericWeb48.svg' 87 'eric7/icons/breeze-dark/ericWeb48.svg'
88 ]), 88 ]),
89 ('share/appdata', ['linux/eric6.appdata.xml']), 89 ('share/appdata', ['linux/eric7.appdata.xml']),
90 ('share/metainfo', ['linux/eric6.appdata.xml']), 90 ('share/metainfo', ['linux/eric7.appdata.xml']),
91 ] 91 ]
92 elif sys.platform.startswith(("win", "cygwin")): 92 elif sys.platform.startswith(("win", "cygwin")):
93 dataFiles = [ 93 dataFiles = [
94 ('scripts', [ 94 ('scripts', [
95 'eric6/pixmaps/eric6.ico', 95 'eric7/pixmaps/eric7.ico',
96 'eric6/pixmaps/ericWeb48.ico']) 96 'eric7/pixmaps/ericWeb48.ico'])
97 ] 97 ]
98 else: 98 else:
99 dataFiles = [] 99 dataFiles = []
100 return dataFiles 100 return dataFiles
101 101
276 ###################################################################### 276 ######################################################################
277 ## setup() below 277 ## setup() below
278 ###################################################################### 278 ######################################################################
279 279
280 Version = getVersion() 280 Version = getVersion()
281 sourceDir = os.path.join(os.path.dirname(__file__), "eric6") 281 sourceDir = os.path.join(os.path.dirname(__file__), "eric7")
282 infoFileName = os.path.join(sourceDir, "UI", "Info.py") 282 infoFileName = os.path.join(sourceDir, "UI", "Info.py")
283 appdataFileName = os.path.join(os.path.dirname(__file__), "linux", 283 appdataFileName = os.path.join(os.path.dirname(__file__), "linux",
284 "eric6.appdata.xml") 284 "eric7.appdata.xml")
285 if sys.argv[1].startswith("bdist"): 285 if sys.argv[1].startswith("bdist"):
286 # prepare the sources under "eric6" for building the wheel file 286 # prepare the sources under "eric7" for building the wheel file
287 print("preparing the sources...") # __IGNORE_WARNING_M801__ 287 print("preparing the sources...") # __IGNORE_WARNING_M801__
288 cleanupSource(sourceDir) 288 cleanupSource(sourceDir)
289 compileUiFiles(sourceDir) 289 compileUiFiles(sourceDir)
290 prepareInfoFile(infoFileName, Version) 290 prepareInfoFile(infoFileName, Version)
291 prepareAppdataFile(appdataFileName, Version) 291 prepareAppdataFile(appdataFileName, Version)
355 data_files=getDataFiles(), 355 data_files=getDataFiles(),
356 packages=find_packages(), 356 packages=find_packages(),
357 zip_safe=False, 357 zip_safe=False,
358 package_data={ 358 package_data={
359 "": getPackageData( 359 "": getPackageData(
360 "eric6", 360 "eric7",
361 [".png", ".svg", ".svgz", ".xpm", ".ico", ".gif", ".icns", ".txt", 361 [".png", ".svg", ".svgz", ".xpm", ".ico", ".gif", ".icns", ".txt",
362 ".tmpl", ".html", ".qch", ".css", ".qss", ".e4h", ".e6h", ".ehj", 362 ".tmpl", ".html", ".qch", ".css", ".qss", ".e4h", ".e6h", ".ehj",
363 ".api", ".bas", ".dat", ".xbel", ".xml", ".js"] 363 ".api", ".bas", ".dat", ".xbel", ".xml", ".js"]
364 ) + ["i18n/eric6_de.qm", "i18n/eric6_en.qm", "i18n/eric6_es.qm", 364 ) + ["i18n/eric7_de.qm", "i18n/eric7_en.qm", "i18n/eric7_es.qm",
365 "i18n/eric6_ru.qm", 365 "i18n/eric7_ru.qm",
366 installInfoName, 366 installInfoName,
367 ] 367 ]
368 }, 368 },
369 entry_points={ 369 entry_points={
370 "gui_scripts": [ 370 "gui_scripts": [
371 "eric6 = eric6.eric6:main", 371 "eric7 = eric7.eric7:main",
372 "eric6_browser = eric6.eric6_browser:main", 372 "eric7_browser = eric7.eric7_browser:main",
373 "eric6_compare = eric6.eric6_compare:main", 373 "eric7_compare = eric7.eric7_compare:main",
374 "eric6_configure = eric6.eric6_configure:main", 374 "eric7_configure = eric7.eric7_configure:main",
375 "eric6_diff = eric6.eric6_diff:main", 375 "eric7_diff = eric7.eric7_diff:main",
376 "eric6_editor = eric6.eric6_editor:main", 376 "eric7_editor = eric7.eric7_editor:main",
377 "eric6_hexeditor = eric6.eric6_hexeditor:main", 377 "eric7_hexeditor = eric7.eric7_hexeditor:main",
378 "eric6_iconeditor = eric6.eric6_iconeditor:main", 378 "eric7_iconeditor = eric7.eric7_iconeditor:main",
379 "eric6_plugininstall = eric6.eric6_plugininstall:main", 379 "eric7_plugininstall = eric7.eric7_plugininstall:main",
380 "eric6_pluginrepository = eric6.eric6_pluginrepository:main", 380 "eric7_pluginrepository = eric7.eric7_pluginrepository:main",
381 "eric6_pluginuninstall = eric6.eric6_pluginuninstall:main", 381 "eric7_pluginuninstall = eric7.eric7_pluginuninstall:main",
382 "eric6_qregularexpression = eric6.eric6_qregularexpression:main", 382 "eric7_qregularexpression = eric7.eric7_qregularexpression:main",
383 "eric6_re = eric6.eric6_re:main", 383 "eric7_re = eric7.eric7_re:main",
384 "eric6_shell = eric6.eric6_shell:main", 384 "eric7_shell = eric7.eric7_shell:main",
385 "eric6_snap = eric6.eric6_snap:main", 385 "eric7_snap = eric7.eric7_snap:main",
386 "eric6_sqlbrowser = eric6.eric6_sqlbrowser:main", 386 "eric7_sqlbrowser = eric7.eric7_sqlbrowser:main",
387 "eric6_tray = eric6.eric6_tray:main", 387 "eric7_tray = eric7.eric7_tray:main",
388 "eric6_trpreviewer = eric6.eric6_trpreviewer:main", 388 "eric7_trpreviewer = eric7.eric7_trpreviewer:main",
389 "eric6_uipreviewer = eric6.eric6_uipreviewer:main", 389 "eric7_uipreviewer = eric7.eric7_uipreviewer:main",
390 "eric6_unittest = eric6.eric6_unittest:main", 390 "eric7_unittest = eric7.eric7_unittest:main",
391 ], 391 ],
392 "console_scripts": [ 392 "console_scripts": [
393 "eric6_api = eric6.eric6_api:main", 393 "eric7_api = eric7.eric7_api:main",
394 "eric6_doc = eric6.eric6_doc:main", 394 "eric7_doc = eric7.eric7_doc:main",
395 "eric6_post_install = eric6.eric6_post_install:main" 395 "eric7_post_install = eric7.eric7_post_install:main"
396 ], 396 ],
397 }, 397 },
398 ) 398 )
399 399
400 # cleanup 400 # cleanup

eric ide

mercurial