1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
Description: Use distutils 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
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+
+import os
+from distutils.core import setup
+
+setup( name = "soundgrain",
+ author = "Olivier Belanger",
+ author_email = "belangeo@gmail.com",
+ version = "4.1.1",
+ description = "A graphical interface to control granular sound synthesis modules.",
+ url = "http://code.google.com/p/soundgrain/",
+ license = "GPLv3",
+ package_dir = { 'soundgrain': '' },
+ packages = ['soundgrain.Resources'],
+ py_modules = ['soundgrain.__init__'], #workaround to have Resources under soundgrain dir
+ scripts = ['SoundGrain.py'],
+ package_data={
+ 'soundgrain.Resources': ['images/*', 'new_soundgrain_file.sg', 'SoundGrainDocIcon.icns', 'SoundGrainDocIcon.ico', 'SoundGrain.icns', 'SoundGrain.ico', 'SoundGrainSplash.png'],
+ }
+ )
--- a/SoundGrain.py
+++ b/SoundGrain.py
@@ -25,14 +25,14 @@
import wx.richtext as rt
from types import ListType
-from Resources.constants import *
-from Resources.audio import *
-from Resources.Modules import *
+from soundgrain.Resources.constants import *
+from soundgrain.Resources.audio import *
+from soundgrain.Resources.Modules import *
from pyolib._wxwidgets import ControlSlider, VuMeter, Grapher, BACKGROUND_COLOUR
-from Resources.Trajectory import Trajectory
-from Resources.FxBall import FxBall
-from Resources.MidiSettings import MidiSettings
-from Resources.splash import SoundGrainSplashScreen
+from soundgrain.Resources.Trajectory import Trajectory
+from soundgrain.Resources.FxBall import FxBall
+from soundgrain.Resources.MidiSettings import MidiSettings
+from soundgrain.Resources.splash import SoundGrainSplashScreen
SCREEN_SIZE = None
--- a/Resources/MidiSettings.py
+++ b/Resources/MidiSettings.py
@@ -20,8 +20,8 @@
import wx, sys
from pyolib._wxwidgets import ControlSlider
-from constants import BACKGROUND_COLOUR, ensureNFD, toSysEncoding
-from Resources.audio import checkForMidiDrivers
+from soundgrain.Resources.constants import BACKGROUND_COLOUR, ensureNFD, toSysEncoding
+from soundgrain.Resources.audio import checkForMidiDrivers
class MidiSettings(wx.Frame):
def __init__(self, parent, surface, sg_audio, miDriver):
--- a/Resources/Trajectory.py
+++ b/Resources/Trajectory.py
@@ -20,7 +20,7 @@
"""
import wx
from math import sin, pi, sqrt, floor
-from Resources.Biquad_Filter import BiquadLP
+from soundgrain.Resources.Biquad_Filter import BiquadLP
def chooseColour(i, numlines=24):
def clip(x):
--- a/Resources/constants.py
+++ b/Resources/constants.py
@@ -17,7 +17,7 @@
along with SoundGrain. If not, see <http://www.gnu.org/licenses/>.
"""
-import os, sys, unicodedata
+import os, sys, unicodedata, soundgrain
from types import UnicodeType
reload(sys)
@@ -38,7 +38,7 @@
spindex = currentw.index('/SoundGrain.app')
os.chdir(currentw[:spindex])
else:
- RESOURCES_PATH = os.path.join(os.getcwd(), 'Resources')
+ RESOURCES_PATH = soundgrain.Resources.__path__[0]
if not os.path.isdir(RESOURCES_PATH) and sys.platform == "win32":
RESOURCES_PATH = os.path.join(os.getenv("ProgramFiles"), "SoundGrain", "Resources")
--- /dev/null
+++ b/__init__.py
@@ -0,0 +1,2 @@
+
+
|