Description: Fix installation to comply with Debian standards
I tried to patch it in a generic way, so I guess it'll be useful for upstream.
Once accepted this patch goes away.
Author: Tiago Bortoletto Vaz <tiago@debian.org>
Last-Update: 2012-07-14
--- a/setup.py
+++ b/setup.py
@@ -6,6 +6,8 @@ Usage:
"""
from setuptools import setup
+import glob
+import os.path
APP = ['Soundgrain.py']
APP_NAME = 'Soundgrain'
@@ -16,9 +18,13 @@ OPTIONS = {'argv_emulation': False,
'includes': 'wx.adv,wx.html,wx.xml'}
setup(
- name=APP_NAME,
- app=APP,
- data_files=DATA_FILES,
- options={'py2app': OPTIONS},
- setup_requires=['py2app'],
+ name="soundgrain",
+ author="Olivier Belanger",
+ author_email="belangeo@gmail.com",
+ version="6.0.1",
+ description="A graphical interface to control granular sound synthesis modules.",
+ url="http://ajaxsoundstudio.com/software/soundgrain/",
+ license="GPLv3",
+ scripts=['SoundGrain.py'],
+ data_files=[(os.path.dirname(f), [f])for f in glob.glob('Resources/**', recursive=True) if os.path.isfile(f)],
)
--- a/SoundGrain.py
+++ b/SoundGrain.py
@@ -20,6 +20,7 @@ along with SoundGrain. If not, see <htt
"""
import sys
import wx
+sys.path.insert(0, '/usr/share/soundgrain')
from Resources.constants import *
from Resources.splash import SoundGrainSplashScreen
from Resources.MainFrame import MainFrame
--- a/Resources/constants.py
+++ b/Resources/constants.py
@@ -44,7 +44,7 @@ if '/SoundGrain.app' in os.getcwd():
spindex = currentw.index('/SoundGrain.app')
os.chdir(currentw[:spindex])
else:
- RESOURCES_PATH = os.path.join(os.getcwd(), 'Resources')
+ RESOURCES_PATH = os.path.dirname(os.path.abspath(__file__))
if not os.path.isdir(RESOURCES_PATH) and sys.platform == "win32":
RESOURCES_PATH = os.path.join(os.getenv("ProgramFiles"), "SoundGrain", "Resources")