Description: Add install support for Linux to setup.py
Author: Wookey <wookey@debian.org>
Last-Update: 2017-10-30

Index: topparser-1.3/setup.py
===================================================================
--- topparser-1.3.orig/setup.py
+++ topparser-1.3/setup.py
@@ -17,33 +17,57 @@
 ##-------------------------------------------------------------------
 
 
-from distutils.core import setup
+import setuptools
+from setuptools import setup
 from Defaults import ProgramInfo as info
-import py2exe
 import os
+if os.name == 'nt': #sys.platform == 'win32':
+    import py2exe
 
-outputname = info().name + info().version.replace('.', '_')
-manualfolder = 'Manual' + info().manversion.replace('.', '_')
-
-copyfiles = [('Images', ['Images/topparser.ico']),
+if os.name == 'nt':
+    outputname = info().name + info().version.replace('.', '_')
+    manualfolder = 'Manual' + info().manversion.replace('.', '_')
+    copyfiles = [('Images', ['Images/topparser.ico']),
                 ('', ['COPYING']),
                 ('', ['ChangeLog.txt'])]
-
-for file in os.listdir('Manual'):
-    if os.path.isfile('Manual/' + file):
-        copyfiles.append([manualfolder, ['Manual/' + file]])
-        print(copyfiles)
-
-setup(
-    name=info().name,
-    version=info().version,
-    url=info().website,
-    author=info().developer,
-    description=info().description,
-    license=info().licence,
-    windows=[{"script": 'TopParser.py',
-              "icon_resourses": [(1, 'Images/topparser.ico')],
-            "copyright": info().copyright}],
-    data_files= copyfiles,
-    options={"py2exe": {"dist_dir": outputname}}
-)
+    for file in os.listdir('Manual'):
+        if os.path.isfile('Manual/' + file):
+            copyfiles.append([manualfolder, ['Manual/' + file]])
+            print(copyfiles)
+elif os.name == 'posix':
+    manualfolder = ''
+    copyfiles = ''
+else:
+    raise Exception("Sorry: no implementation for your platform ('%s') available" % os.name)
+
+
+if os.name == 'nt':
+    setup(
+        name=info().name,
+        version=info().version,
+        url=info().website,
+        author=info().developer,
+        author_email=info().developer_email,
+        description=info().description,
+        license=info().licence,
+        #python_requires='2.6,2.7,<3',
+        windows=[{"script": 'TopParser.py',
+                  "icon_resourses": [(1, 'Images/topparser.ico')],
+                "copyright": info().copyright}],
+        data_files= copyfiles,
+        options={"py2exe": {"dist_dir": outputname}}
+    )
+
+if os.name == 'posix':
+    setup(
+        name=info().name,
+        version=info().version,
+        url=info().website,
+        author=info().developer,
+        author_email=info().developer_email,
+        description=info().description,
+        license=info().licence,
+        #python_requires='2.6,2.7,<3',
+        #scripts='TopParser',
+        data_files='',
+    )
