Description: creates a setup.py
 Upstream doesn't provide a setup.py for linux systems
Author: Tiago Bortoletto Vaz <tiago@debian.org>
Author: Dennis Braun <d_braun@kabelmail.de>
Last-Update: 2020-02-06

--- a/Cecilia5.py
+++ b/Cecilia5.py
@@ -21,11 +21,11 @@
 """
 import os, sys, random
 import wx
-from Resources.constants import *
-from Resources.Variables import loadBitmaps
-from Resources import audio, CeciliaMainFrame
-from Resources.splash import CeciliaSplashScreen
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources.constants import *
+from cecilia.Resources.Variables import loadBitmaps
+from cecilia.Resources import audio, CeciliaMainFrame
+from cecilia.Resources.splash import CeciliaSplashScreen
+import cecilia.Resources.CeciliaLib as CeciliaLib
 
 class CeciliaApp(wx.App):
     def __init__(self, *args, **kwargs):
--- a/Resources/CeciliaInterface.py
+++ b/Resources/CeciliaInterface.py
@@ -20,9 +20,9 @@
 """
 
 import wx
-import Resources.CeciliaLib as CeciliaLib
-import Resources.Control as Control
-import Resources.Preset as Preset
+from cecilia.Resources import CeciliaLib
+from cecilia.Resources import Control
+from cecilia.Resources import Preset
 from .constants import *
 from .Sliders import buildHorizontalSlidersBox
 from .Grapher import getGrapher, buildGrapher
--- a/Resources/CeciliaLib.py
+++ b/Resources/CeciliaLib.py
@@ -24,7 +24,7 @@
 from subprocess import Popen
 from .constants import *
 from .API_interface import *
-import Resources.Variables as vars
+from cecilia.Resources import Variables as vars
 import wx.lib.agw.supertooltip as STT
 import xmlrpc.client as xmlrpclib
 
--- a/Resources/CeciliaMainFrame.py
+++ b/Resources/CeciliaMainFrame.py
@@ -22,9 +22,9 @@
 import os, time, random
 import wx
 from .constants import *
-import Resources.CeciliaLib as CeciliaLib
-import Resources.PreferencePanel as PreferencePanel
-import Resources.CeciliaInterface as CeciliaInterface
+from cecilia.Resources import CeciliaLib
+from cecilia.Resources import PreferencePanel
+from cecilia.Resources import CeciliaInterface
 from .menubar import InterfaceMenuBar
 from .Widgets import *
 from .DocFrame import ManualFrame
--- a/Resources/CeciliaPlot.py
+++ b/Resources/CeciliaPlot.py
@@ -90,7 +90,7 @@
 """
 
 import wx
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaLib
 from .constants import *
 
 try:
--- a/Resources/Control.py
+++ b/Resources/Control.py
@@ -20,7 +20,7 @@
 
 import wx, os, math, copy
 import wx.lib.scrolledpanel as scrolled
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaLib
 from .constants import *
 from .Widgets import *
 from .TogglePopup import SamplerPopup, SamplerToggle
--- a/Resources/DocFrame.py
+++ b/Resources/DocFrame.py
@@ -22,7 +22,7 @@
 import wx.stc as stc
 from .constants import *
 from .API_interface import *
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaLib
 
 _INTRO_TEXT = """
 "Cecilia5 API Documentation"
--- a/Resources/Grapher.py
+++ b/Resources/Grapher.py
@@ -21,8 +21,8 @@
 import wx, random, bisect, math
 from wx.lib.stattext import GenStaticText
 from pyo import reducePoints, distanceToSegment, linToCosCurve
-import Resources.CeciliaPlot as plot
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaPlot as plot
+from cecilia.Resources import CeciliaLib
 from .constants import *
 from .Grapher_parser import *
 from .Widgets import *
--- a/Resources/Plugins.py
+++ b/Resources/Plugins.py
@@ -19,7 +19,7 @@
 """
 
 import wx, math
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaLib
 from .constants import *
 from .Widgets import *
 
--- a/Resources/PreferencePanel.py
+++ b/Resources/PreferencePanel.py
@@ -19,7 +19,7 @@
 """
 
 import wx, os, sys
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaLib
 from .constants import *
 from .Widgets import *
 
--- a/Resources/Preset.py
+++ b/Resources/Preset.py
@@ -19,7 +19,7 @@
 """
 
 import wx, os
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaLib
 from .constants import *
 from .Widgets import *
 
--- a/Resources/Sliders.py
+++ b/Resources/Sliders.py
@@ -19,7 +19,7 @@
 """
 
 import wx, math
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaLib
 from .constants import *
 from .Widgets import *
 
--- a/Resources/TogglePopup.py
+++ b/Resources/TogglePopup.py
@@ -21,7 +21,7 @@
 import wx, random
 from .Widgets import Label, CustomMenu, Toggle, Button, ListEntry
 from .constants import *
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaLib
 
 class CECPopup:
     def __init__(self, parent, label, values, init, rate, name, colour, tooltip=True, output=True):
--- a/Resources/Widgets.py
+++ b/Resources/Widgets.py
@@ -24,7 +24,7 @@
 from pyo.lib._wxwidgets import ControlSlider, HRangeSlider
 from .constants import *
 from .Drunk import *
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaLib
 
 class MenuFrame(wx.Menu):
     def __init__(self, parent, choice):
--- a/Resources/audio.py
+++ b/Resources/audio.py
@@ -20,7 +20,7 @@
 
 import wx
 import os, math, copy, time, traceback
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaLib
 from .constants import *
 from .API_interface import *
 
--- a/Resources/constants.py
+++ b/Resources/constants.py
@@ -17,7 +17,7 @@
 You should have received a copy of the GNU General Public License
 along with Cecilia 5.  If not, see <http://www.gnu.org/licenses/>.
 """
-import os, sys
+import os, sys, cecilia
 from .images import *
 
 BUILD_RST = False
@@ -38,7 +38,7 @@
     RESOURCES_PATH = os.getcwd()
     os.environ["LANG"] = "en_CA.UTF-8"
 else:
-    RESOURCES_PATH = os.path.join(os.getcwd(), 'Resources')
+    RESOURCES_PATH = cecilia.Resources.__path__[0]
 
 if not os.path.isdir(RESOURCES_PATH) and sys.platform == "win32":
     RESOURCES_PATH = os.path.join(os.getenv("ProgramFiles"), "Cecilia5", "Resources")
@@ -745,4 +745,4 @@
 Parameters appear on the left buttons. 
 
 Signal routing is from top to bottom.
-"""
\ No newline at end of file
+"""
--- a/Resources/menubar.py
+++ b/Resources/menubar.py
@@ -20,7 +20,7 @@
 
 import wx, os
 from .constants import *
-import Resources.CeciliaLib as CeciliaLib
+from cecilia.Resources import CeciliaLib
 
 class InterfaceMenuBar(wx.MenuBar):
     def __init__(self, frame, mainFrame=None):
--- a/Resources/splash.py
+++ b/Resources/splash.py
@@ -19,7 +19,7 @@
 """
 
 import wx, sys, os
-from .constants import *
+from cecilia.Resources.constants import *
 
 def GetRoundBitmap(w, h, r):
     maskColour = wx.Colour(0, 0, 0)
@@ -96,4 +96,4 @@
 
     def OnClose(self):
         self.callback()
-        self.Destroy()
\ Kein Zeilenumbruch am Dateiende.
+        self.Destroy()
--- a/setup.py
+++ b/setup.py
@@ -1,24 +1,20 @@
-"""
-This is a setup.py script generated by py2applet
+# -*- coding: utf-8 -*-
 
-Usage:
-    python3.6 setup.py py2app
-"""
+import os
+from distutils.core import setup
 
-from setuptools import setup
-
-APP = ['Cecilia5.py']
-APP_NAME = 'Cecilia5'
-DATA_FILES = ['Resources/']
-OPTIONS = {'argv_emulation': False,
-           #'strip': False, # only for debugging purposes.
-           'iconfile': 'Resources/Cecilia5.icns',
-           'includes': 'wx.adv,wx.html,wx.xml'}
-
-setup(
-    name=APP_NAME,
-    app=APP,
-    data_files=DATA_FILES,
-    options={'py2app': OPTIONS},
-    setup_requires=['py2app'],
-)
+setup(  name = "cecilia",
+        author = "Jean Piche, Olivier Belanger, Jean-Michel Dumas",
+        author_email = "belangeo@gmail.com",
+        version = "5.3.5",
+        description = "Sound synthesis and audio signal processing environment",
+        url = "https://github.com/belangeo/cecilia5",
+        license = "GPLv3",
+        package_dir = { 'cecilia': '' },
+        packages = ['cecilia.Resources'],
+        py_modules = ['cecilia.__init__'], #workaround to have Resources under cecilia dir
+        scripts = ['Cecilia5.py'],
+        package_data={
+            'cecilia.Resources': ['modules/*/*', 'Cecilia5.icns', 'Cecilia5.ico', 'CeciliaFileIcon5.icns', 'CeciliaFileIcon5.ico', 'Cecilia_splash.png'],
+        }
+    )
