Codebase list soundgrain / 8624c90
Fixing setup patch. Tiago Bortoletto Vaz 11 years ago
1 changed file(s) with 86 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
00 --- /dev/null
11 +++ b/setup.py
2 @@ -0,0 +1,24 @@
2 @@ -0,0 +1,32 @@
33 +# -*- coding: utf-8 -*-
44 +
5 +import os
56 +from distutils.core import setup
7 +
8 +#misc_files = [('soundgrain/Resources', ['Resources/new_soundgrain_file.sg', 'Resources/SoundGrainDocIcon.icns', 'Resources/SoundGrainDocIcon.ico', 'Resources/SoundGrain.icns', 'Resources/SoundGrain.ico', 'Resources/SoundGrainSplash.png'])]
9 +#misc_files += [file for file in os.listdir('Resources/images') if os.path.isfile(file)]
610 +
711 +setup( name = "soundgrain",
812 + author = "Olivier Belanger",
1317 + license = "GPLv3",
1418 + package_dir = { 'soundgrain': '' },
1519 + packages = ['soundgrain.Resources'],
16 + py_modules = ['soundgrain.SoundGrain']
20 + scripts = ['SoundGrain.py'],
21 + package_data={
22 + 'soundgrain.Resources': ['images/*', 'new_soundgrain_file.sg', 'SoundGrainDocIcon.icns', 'SoundGrainDocIcon.ico', 'SoundGrain.icns', 'SoundGrain.ico', 'SoundGrainSplash.png'],
23 + },
24 +# package_data = {'soundgrain': ['Resources/images/*.png']}
1725 +# install_path = 'soundgrain'
18 + entry_points = {
19 + 'console_scripts': [
20 + 'soundgrain = soundgrain.SoundGrain:main',
21 + ],
22 + #'gui_scripts': [
23 + # 'baz = my_package_gui.start_func',
24 + #]
25 + }
26 +# entry_points = {
27 +# 'console_scripts': [
28 +# 'soundgrain = soundgrain.SoundGrain',
29 +# ],
30 +# 'gui_scripts': [
31 +# 'sg = soundgrain.SoundGrain',
32 +# ]
33 +# }
2634 + )
35 --- a/SoundGrain.py
36 +++ b/SoundGrain.py
37 @@ -25,14 +25,14 @@
38 import wx.richtext as rt
39 from types import ListType
40
41 -from Resources.constants import *
42 -from Resources.audio import *
43 -from Resources.Modules import *
44 +from soundgrain.Resources.constants import *
45 +from soundgrain.Resources.audio import *
46 +from soundgrain.Resources.Modules import *
47 from pyolib._wxwidgets import ControlSlider, VuMeter, Grapher, BACKGROUND_COLOUR
48 -from Resources.Trajectory import Trajectory
49 -from Resources.FxBall import FxBall
50 -from Resources.MidiSettings import MidiSettings
51 -from Resources.splash import SoundGrainSplashScreen
52 +from soundgrain.Resources.Trajectory import Trajectory
53 +from soundgrain.Resources.FxBall import FxBall
54 +from soundgrain.Resources.MidiSettings import MidiSettings
55 +from soundgrain.Resources.splash import SoundGrainSplashScreen
56
57 SCREEN_SIZE = None
58
59 --- a/Resources/MidiSettings.py
60 +++ b/Resources/MidiSettings.py
61 @@ -20,8 +20,8 @@
62
63 import wx, sys
64 from pyolib._wxwidgets import ControlSlider
65 -from constants import BACKGROUND_COLOUR, ensureNFD, toSysEncoding
66 -from Resources.audio import checkForMidiDrivers
67 +from soundgrain.Resources.constants import BACKGROUND_COLOUR, ensureNFD, toSysEncoding
68 +from soundgrain.Resources.audio import checkForMidiDrivers
69
70 class MidiSettings(wx.Frame):
71 def __init__(self, parent, surface, sg_audio, miDriver):
72 --- a/Resources/Trajectory.py
73 +++ b/Resources/Trajectory.py
74 @@ -20,7 +20,7 @@
75 """
76 import wx
77 from math import sin, pi, sqrt, floor
78 -from Resources.Biquad_Filter import BiquadLP
79 +from soundgrain.Resources.Biquad_Filter import BiquadLP
80
81 def chooseColour(i, numlines=24):
82 def clip(x):
83 --- a/Resources/constants.py
84 +++ b/Resources/constants.py
85 @@ -17,7 +17,7 @@
86 along with SoundGrain. If not, see <http://www.gnu.org/licenses/>.
87 """
88
89 -import os, sys, unicodedata
90 +import os, sys, unicodedata, soundgrain
91 from types import UnicodeType
92
93 reload(sys)
94 @@ -38,7 +38,7 @@
95 spindex = currentw.index('/SoundGrain.app')
96 os.chdir(currentw[:spindex])
97 else:
98 - RESOURCES_PATH = os.path.join(os.getcwd(), 'Resources')
99 + RESOURCES_PATH = soundgrain.Resources.__path__[0]
100
101 if not os.path.isdir(RESOURCES_PATH) and sys.platform == "win32":
102 RESOURCES_PATH = os.path.join(os.getenv("ProgramFiles"), "SoundGrain", "Resources")