Mon, 15 Apr 2019 19:53:29 +0200
setup.py: continued implementing support for setup.py.
--- a/.hgignore Sun Apr 14 19:29:24 2019 +0200 +++ b/.hgignore Mon Apr 15 19:53:29 2019 +0200 @@ -18,3 +18,7 @@ glob:**.coverage glob:GPUCache glob:**Thumbs.db +glob:eric6.egg-info +glob:dist +glob:build +glob:VERSION
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MANIFEST.in Mon Apr 15 19:53:29 2019 +0200 @@ -0,0 +1,9 @@ +recursive-include eric6 *.png *.svg *.svgz *.xpm *.ico *.gif *.icns *.txt *.style *.tmpl *.html *.qch *.qhp *.css *.qss *.e4h *.e6h *.api *.bas *.qm *.ts *.qrc *.ui *.rst *.dat *.xbel *.xml *.js *.xpm *.md *.pyw +include Dictionaries/* +include docs/* +include linux/* +include others/* +include MANIFEST.in +include eric6.e4p +include setup.py +include VERSION
--- a/eric6.e4p Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6.e4p Mon Apr 15 19:53:29 2019 +0200 @@ -1705,6 +1705,7 @@ <Source>eric6/eric6_re.py</Source> <Source>eric6/eric6_re.pyw</Source> <Source>eric6/eric6_shell.py</Source> + <Source>eric6/eric6_shell.pyw</Source> <Source>eric6/eric6_snap.py</Source> <Source>eric6/eric6_snap.pyw</Source> <Source>eric6/eric6_sqlbrowser.py</Source> @@ -2272,6 +2273,7 @@ <Other>.hgignore</Other> <Other>DTDs</Other> <Other>Dictionaries</Other> + <Other>MANIFEST.in</Other> <Other>docs/LICENSE.GPL3</Other> <Other>docs/README-MacOSX.rst</Other> <Other>docs/README-eric6-doc.rst</Other> @@ -2483,8 +2485,11 @@ <Other>eric6/WebBrowser/data/javascript/qwebchannel.js</Other> <Other>eric6/icons</Other> <Other>eric6/pixmaps</Other> + <Other>linux/eric6.appdata.xml</Other> <Other>linux/eric6.appdata.xml.in</Other> + <Other>linux/eric6.desktop</Other> <Other>linux/eric6.desktop.in</Other> + <Other>linux/eric6_browser.desktop</Other> <Other>linux/eric6_browser.desktop.in</Other> <Other>linux/eric6_webbrowser.desktop.in</Other> <Other>others/default.e4k</Other>
--- a/eric6/PluginManager/PluginRepositoryDialog.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/PluginManager/PluginRepositoryDialog.py Mon Apr 15 19:53:29 2019 +0200 @@ -63,6 +63,7 @@ PluginStatusNew = 1 PluginStatusLocalUpdate = 2 PluginStatusRemoteUpdate = 3 + PluginStatusError = 4 def __init__(self, pluginManager, parent=None): """ @@ -636,6 +637,9 @@ itm.setIcon(1, UI.PixmapCache.getIcon("updateRemote.png")) itm.setToolTip(1, self.tr("updated download available")) self.__updateRemoteItems += 1 + elif updateStatus == PluginRepositoryWidget.PluginStatusError: + itm.setIcon(1, UI.PixmapCache.getIcon("warning.png")) + itm.setToolTip(1, self.tr("error determining status")) def __updateStatus(self, filename, version): """ @@ -660,6 +664,8 @@ if pluginDetails is None or \ pluginDetails["moduleName"] != pluginName: return PluginRepositoryWidget.PluginStatusNew + if pluginDetails["error"]: + return PluginRepositoryWidget.PluginStatusError pluginVersionTuple = Globals.versionToTuple( pluginDetails["version"])[:3] versionTuple = Globals.versionToTuple(version)[:3]
--- a/eric6/eric6.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6.py Mon Apr 15 19:53:29 2019 +0200 @@ -25,6 +25,8 @@ restartArgs = [arg for arg in sys.argv[1:] if arg.split("=", 1)[0] in restartArgsList] +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2
--- a/eric6/eric6_api.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_api.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import os +import sys + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -22,8 +27,6 @@ pass import glob -import os -import sys import fnmatch # make ThirdParty package available as a packages repository
--- a/eric6/eric6_browser.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_browser.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -30,9 +35,6 @@ except AttributeError: pass -import sys -import os - from Globals import qVersionTuple app = None @@ -179,9 +181,6 @@ "web browser", options) - if not Globals.checkBlacklistedVersions(): - sys.exit(100) - # set the library paths for plugins Startup.setLibraryPaths()
--- a/eric6/eric6_compare.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_compare.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -21,9 +26,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_configure.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_configure.py Mon Apr 15 19:53:29 2019 +0200 @@ -12,6 +12,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -19,9 +24,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_diff.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_diff.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -21,9 +26,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_doc.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_doc.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import os +import sys + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -22,8 +27,6 @@ pass import glob -import os -import sys import fnmatch import Utilities.ModuleParser
--- a/eric6/eric6_editor.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_editor.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -21,9 +26,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_hexeditor.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_hexeditor.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -21,9 +26,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_iconeditor.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_iconeditor.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -21,9 +26,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_plugininstall.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_plugininstall.py Mon Apr 15 19:53:29 2019 +0200 @@ -13,6 +13,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -20,9 +25,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_pluginrepository.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_pluginrepository.py Mon Apr 15 19:53:29 2019 +0200 @@ -13,6 +13,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -20,9 +25,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_pluginuninstall.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_pluginuninstall.py Mon Apr 15 19:53:29 2019 +0200 @@ -13,6 +13,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -20,9 +25,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_qregexp.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_qregexp.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -21,9 +26,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_qregularexpression.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_qregularexpression.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -21,9 +26,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_re.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_re.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -21,9 +26,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_shell.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_shell.py Mon Apr 15 19:53:29 2019 +0200 @@ -18,6 +18,8 @@ originalPathString = os.getenv("PATH") +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eric6/eric6_shell.pyw Mon Apr 15 19:53:29 2019 +0200 @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing the Windows entry point. +""" + +from __future__ import unicode_literals + +from eric6_shell import main + +main()
--- a/eric6/eric6_snap.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_snap.py Mon Apr 15 19:53:29 2019 +0200 @@ -13,6 +13,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -20,9 +25,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_sqlbrowser.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_sqlbrowser.py Mon Apr 15 19:53:29 2019 +0200 @@ -13,6 +13,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -20,9 +25,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_tray.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_tray.py Mon Apr 15 19:53:29 2019 +0200 @@ -20,6 +20,8 @@ PyQt4Option = "--pyqt4" in sys.argv SettingsDir = None +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2
--- a/eric6/eric6_trpreviewer.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_trpreviewer.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -21,9 +26,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_uipreviewer.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_uipreviewer.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -21,9 +26,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_unittest.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_unittest.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -21,9 +26,6 @@ except (ImportError): pass -import sys -import os - for arg in sys.argv[:]: if arg.startswith("--config="): import Globals
--- a/eric6/eric6_webbrowser.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6_webbrowser.py Mon Apr 15 19:53:29 2019 +0200 @@ -14,6 +14,11 @@ from __future__ import unicode_literals +import sys +import os + +sys.path.insert(1, os.path.dirname(__file__)) + import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 @@ -30,9 +35,6 @@ except AttributeError: pass -import sys -import os - try: from PyQt5 import QtWebKit # __IGNORE_WARNING__ except ImportError: @@ -154,9 +156,6 @@ "web browser", options) - if not Globals.checkBlacklistedVersions(): - sys.exit(100) - # set the library paths for plugins Startup.setLibraryPaths()
--- a/eric6/eric6config.py Sun Apr 14 19:29:24 2019 +0200 +++ b/eric6/eric6config.py Mon Apr 15 19:53:29 2019 +0200 @@ -9,10 +9,9 @@ from __future__ import unicode_literals -import sys import os -__ericDir = os.path.dirname(sys.argv[0]) +__ericDir = os.path.dirname(__file__) _pkg_config = { 'ericDir': __ericDir,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux/eric6.appdata.xml Mon Apr 15 19:53:29 2019 +0200 @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<component type="desktop"> + <id>eric6.desktop</id> + <metadata_license>CC-BY-3.0</metadata_license> + <project_license>GPL-3.0+</project_license> + <name>eric6</name> + <summary>Integrated Development Environment for Python</summary> + <description> + <p> + Eric is a full featured Python editor and IDE, written + in Python. It is based on the cross platform Qt GUI toolkit, integrating + the highly flexible QScintilla editor control. It is designed to be + usable as everdays' quick and dirty editor as well as being usable as a + professional project management tool integrating many advanced features + Python offers the professional coder. Eric includes a plug-in system, which + allows easy extension of the IDE functionality with plug-ins downloadable + from the net. + </p> + </description> + <screenshots> + <screenshot type="default" width="1931" height="1404">https://eric-ide.python-projects.org/images/eric5-screen-01.png</screenshot> + <screenshot width="1936" height="1404">https://eric-ide.python-projects.org/images/eric5-screen-02.png</screenshot> + <screenshot width="1330" height="1405">https://eric-ide.python-projects.org/images/eric5-screen-04.png</screenshot> + <screenshot width="1431" height="1254">https://eric-ide.python-projects.org/images/eric5-screen-10.png</screenshot> + </screenshots> + <url type="homepage">https://eric-ide.python-projects.org</url> + <url type="bugtracker">https://die-offenbachs.homelinux.org/issues/</url> + <url type="translate">https://eric-ide.python-projects.org/eric-translations.html</url> + <url type="donation">https://www.paypal.com/cgi-bin/webscr?item_name=Donation+to+Eric+Integrated+Development+Environment&cmd=_donations&business=detlev@die-offenbachs.de</url> + <update_contact>detlev_AT_die-offenbachs.de</update_contact> + <developer_name>Detlev Offenbach</developer_name> + <translation type="qt">eric6</translation> + <provides> + <binary>eric6</binary> + <binary>eric6_api</binary> + <binary>eric6_browser</binary> + <binary>eric6_compare</binary> + <binary>eric6_configure</binary> + <binary>eric6_diff</binary> + <binary>eric6_doc</binary> + <binary>eric6_editor</binary> + <binary>eric6_hexeditor</binary> + <binary>eric6_iconeditor</binary> + <binary>eric6_plugininstall</binary> + <binary>eric6_pluginrepository</binary> + <binary>eric6_pluginuninstall</binary> + <binary>eric6_qregexp</binary> + <binary>eric6_qregularexpression</binary> + <binary>eric6_re</binary> + <binary>eric6_shell</binary> + <binary>eric6_snap</binary> + <binary>eric6_sqlbrowser</binary> + <binary>eric6_tray</binary> + <binary>eric6_trpreviewer</binary> + <binary>eric6_uipreviewer</binary> + <binary>eric6_unittest</binary> + </provides> +</component>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux/eric6.desktop Mon Apr 15 19:53:29 2019 +0200 @@ -0,0 +1,16 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Exec=eric6 +TryExec=eric6 +MimeType=text/x-python; +Icon=eric +Terminal=false +Name=eric6 +Name[de]=eric6 +Comment=Integrated Development Environment for Python +Comment[de]=Integrierte Entwicklungsumgebung für Python +GenericName=IDE for Python +GenericName[de]=IDE für Python +Categories=Qt;X-Python;Development;IDE; +StartupNotify=true
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux/eric6_browser.desktop Mon Apr 15 19:53:29 2019 +0200 @@ -0,0 +1,16 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Exec=eric6_browser +TryExec=eric6_browser +MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-mimearchive; +Icon=ericWeb48 +Terminal=false +Name=eric6 Web Browser (QtWebEngine) +Name[de]=eric6 Web Browser (QtWebEngine) +Comment=Web Browser for PyQt5 based on QtWebEngine +Comment[de]=Web Browser für PyQt5 basierend auf QtWebEngine +GenericName=Web Browser +GenericName[de]=Web Browser +Categories=Qt;X-Python;Network;WebBrowser;X-QtWebEngine; +StartupNotify=true
--- a/setup.py Sun Apr 14 19:29:24 2019 +0200 +++ b/setup.py Mon Apr 15 19:53:29 2019 +0200 @@ -1,27 +1,121 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +# Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de> +# + +from __future__ import unicode_literals + +import os +import sys +import subprocess + from setuptools import setup, find_packages +from distutils.command.install_data import install_data +###################################################################### +## some helper functions below +###################################################################### + +def getVersion(): + """ + Function to get the version from file. + + @return string containing the version + @rtype str + """ + version = "<unknown>" + with open(os.path.join(os.path.dirname(__file__), "VERSION"), + encoding="ASCII") as f: + version = f.read().strip() + return version + + +def getPackageData(package, extensions): + """ + Function to return data files of a package with givene extensions. + + @param package name of the package directory + @type str + @param extensions list of extensions to test for + @type list of str + @return list of package data files + @rtype list of str + """ + filesList = [] + for dirpath, _dirnames, filenames in os.walk(package): + for fname in filenames: + if not fname.startswith('.') and \ + os.path.splitext(fname)[1] in extensions: + filesList.append( + os.path.relpath(os.path.join(dirpath, fname), package)) + return filesList + +def getDataFiles(): + """ + Return data_files in a platform dependent manner + """ + if sys.platform.startswith('linux'): + dataFiles = [ + ('share/applications', [ + 'linux/eric6.desktop', + 'linux/eric6_browser.desktop', + ]), + ('share/icons', [ + 'eric6/icons/default/eric.png', + 'eric6/icons/default/ericWeb48.png' + ]), + ('share/metainfo', ['linux/eric6.appdata.xml']) + ] + elif os.name == 'nt': + dataFiles = [ + ('scripts', [ + 'eric6/pixmaps/eric6.ico', + 'eric6/pixmaps/ericWeb48.ico']) + ] + else: + dataFiles = [] + return dataFiles + +###################################################################### +## make Linux detect eric6 desktop files +###################################################################### + +class Eric6InstallData(install_data): + def run(self): + install_data.run(self) + if sys.platform.startswith('linux'): + try: + subprocess.call(['update-desktop-database']) + except: + print("ERROR: unable to update desktop database", + file=sys.stderr) +CmdClass = { + 'install_data': Eric6InstallData, +} + +###################################################################### +## setup() below +###################################################################### setup( name="eric6", - version="19.5", # TODO: replace with reading from file + version=getVersion(), description="eric6 is an integrated development environment for the" " Python language.", long_description="eric6 is an integrated development environment for the" " Python language. It uses the PyQt5 bindings and the QScintilla2" - " editor widget. It may be used with PyQt4 as well.", + " editor widget. See https://eric-ide.python-projects.org for more" + " details.", author="Detlev Offenbach", author_email="detlev@die-offenbachs.de", url="https://eric-ide.python-projects.org", - download_url="https://sourceforge.net/projects/eric-ide/files/eric6/" - "stable", - platforms=[ - "Linux", - "Windows", - "macOS" - ], + project_urls={ + "Source Code": "https://die-offenbachs.homelinux.org/hg/eric/", + "Issues Tracker": "https://die-offenbachs.homelinux.org/issues/", + }, + platforms=["Linux", "Windows", "macOS"], + license="GPLv3", classifiers=[ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Environment :: MacOS X", @@ -46,51 +140,7 @@ "Topic :: Text Editors :: Integrated Development Environments (IDE)" ], keywords="Development PyQt5 IDE Python3", - packages=find_packages("eric6"), - include_package_data=True, -## scripts=[ -## "eric6_api.py", -## "eric6_browser.py", -## "eric6_compare.py", -## "eric6_configure.py", -## "eric6_diff.py", -## "eric6_doc.py", -## "eric6_editor.py", -## "eric6_hexeditor.py", -## "eric6_iconeditor.py", -## "eric6_plugininstall.py", -## "eric6_pluginrepository.py", -## "eric6_pluginuninstall.py", -## "eric6_qregexp.py", -## "eric6_qregularexpression.py", -## "eric6_re.py", -## "eric6_shell.py", -## "eric6_snap.py", -## "eric6_sqlbrowser.py", -## "eric6_tray.py", -## "eric6_trpreviewer.py", -## "eric6_uipreviewer.py", -## "eric6_unittest.py", -## "eric6_webbrowser.py", -## "eric6.py" -## ], python_requires=">=3.5", - package_data={ - # TODO: fill with package data - "": [ - "*.qm", "*.html", - ], - }, - # TODO: fill with entry points - entry_points={ -## "gui_scripts": [ -## "eric6 = eric6.eric:main", -## ], -## "scripts":[ -## "eric6_api = eric6.eric6_api:main", -## "eric6_doc = eric6.eric6_doc:main", -## ], - }, install_requires=[ "PyQt5>=5.12.1", "PyQtWebEngine>=5.12.1", @@ -99,4 +149,48 @@ "docutils", "Markdown", ], + data_files=getDataFiles(), + packages=find_packages(), +# include_package_data=True, + zip_safe=False, + package_data={ + "": getPackageData( + "eric6", + [".png", ".svg", ".svgz", ".xpm", ".ico", ".gif", ".icns", ".txt", + ".style", ".tmpl", ".html", ".qch", ".css", ".qss", ".e4h", + ".e6h", ".api", ".bas" ".dat"]) + + ["i18n/eric6_de.qm", "i18n/eric6_en.qm", "i18n/eric6_es.qm", + "i18n/eric6_ru.qm", + ] + }, + entry_points={ + "gui_scripts": [ + "eric6 = eric6.eric6:main", + "eric6_browser = eric6.eric6_browser:main", + "eric6_compare = eric6.eric6_compare:main", + "eric6_configure = eric6.eric6_configure:main", + "eric6_diff = eric6.eric6_diff:main", + "eric6_editor = eric6.eric6_editor:main", + "eric6_hexeditor = eric6.eric6_hexeditor:main", + "eric6_iconeditor = eric6.eric6_iconeditor:main", + "eric6_plugininstall = eric6.eric6_plugininstall:main", + "eric6_pluginrepository = eric6.eric6_pluginrepository:main", + "eric6_pluginuninstall = eric6.eric6_pluginuninstall:main", + "eric6_qregexp = eric6.eric6_qregexp:main", + "eric6_qregularexpression = eric6.eric6_qregularexpression:main", + "eric6_re = eric6.eric6_re:main", + "eric6_shell = eric6.eric6_shell:main", + "eric6_snap = eric6.eric6_snap:main", + "eric6_sqlbrowser = eric6.eric6_sqlbrowser:main", + "eric6_tray = eric6.eric6_tray:main", + "eric6_trpreviewer = eric6.eric6_trpreviewer:main", + "eric6_uipreviewer = eric6.eric6_uipreviewer:main", + "eric6_unittest = eric6.eric6_unittest:main", + ], + "console_scripts":[ + "eric6_api = eric6.eric6_api:main", + "eric6_doc = eric6.eric6_doc:main", + ], + }, + cmdclass=CmdClass, )