-def find_files(dirs):
+def find_files(dirs, dest_root='share'):
'''Walk files and directories and return them in a form for data_files'''
# pylint: disable-msg=W0621
result = []
@@ -14,7 +14,7 @@
dirs = [dirs]
for dir in dirs:
for root, dirs, files in os.walk(dir):
- dest = os.path.join('share/entertainer', root)
+ dest = os.path.join(dest_root, root) source_files = [os.path.join(root, file) for file in files] result.append((dest, source_files))
return result
@@ -32,7 +32,8 @@
'entertainerlib/utils/glade/*',
]
=== removed directory 'cfg/data' /utils/ configuration. py' utils/configura tion.py 2008-09-17 18:27:37 +0000 utils/configura tion.py 2008-10-25 13:12:21 +0000
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -16,9 +16,11 @@
from entertainerlib. utils.theme import Theme
-SOURCE_CONFIG = os.path.abspath( dirname( __file_ _) + '/../../cfg' abspath( os.path. dirname( __file_ _) + '/../../cfg'), entertainer/ cfg"
- os.path.
- )
+SOURCE_CONFIG = {
+ 'branch' : os.path.
+ # Hardcoded path for a package install
+ 'package' : "/usr/share/
+ }
class Configuration( MessageHandler) : copytree( SOURCE_ CONFIG, config_dir) exists( SOURCE_ CONFIG[ 'branch' ]): copytree( SOURCE_ CONFIG[ 'branch' ], config_dir) exists( SOURCE_ CONFIG[ 'package' ]): copytree( SOURCE_ CONFIG[ 'package' ], config_dir)
"""
@@ -97,7 +99,15 @@
'''
config_dir = self.get_cfg_dir()
try:
- shutil.
+ # Copy configuration data from a dev branch if we can
+ if os.path.
+ shutil.
+ # Install configuration data from the hardcoded package path
+ elif os.path.
+ shutil.
+ else:
+ print "Couldn't find configuration data. Execution aborted."
+ sys.exit(1)
except OSError:
print "Couldn't copy configuration data to %s. Execution aborted." \
% config_dir
=== renamed directory 'cfg/data/icons' => 'icons' hicolor/ 16x16' hicolor/ 16x16/entertain er.png' 16x16/entertain er.png 1970-01-01 00:00:00 +0000 and icons/hicolor/ 16x16/entertain er.png 2008-10-25 13:12:22 +0000 differ icons/24x24' => 'icons/ hicolor/ 24x24' hicolor/ 48x48' hicolor/ 48x48/entertain er.png' 48x48/entertain er.png 1970-01-01 00:00:00 +0000 and icons/hicolor/ 48x48/entertain er.png 2008-10-25 13:12:21 +0000 differ icons/scalable' => 'icons/ hicolor/ scalable' hicolor/ scalable/ entertainer. svg' icons/scalable/ entertainer. svg 2008-06-06 22:54:48 +0000 scalable/ entertainer. svg 2008-10-25 13:12:22 +0000 version= "0.32" version= "0.46" docname= "entertainer_ icon.svg" docname= "entertainer. svg" output_ extension= "org.inkscape. output. svg.inkscape" export- filename= "/home/ matt/Desktop/ magicianhat. png" export- xdpi="11. 675675" export- ydpi="11. 675675" export- filename= "/home/ matt/repo/ config- package- fix/icons/ hicolor/ 48x48/entertain er.png" export- xdpi="23. 549999" export- ydpi="23. 549999" "display: inline" >
offset= "1"
id=" stop3308" /> linearGradient> perspective type="inkscape: persp3d" vp_z="744. 09448 : 526.18109 : 1" persp3d- origin= "372.04724 : 350.78739 : 1" dient
inkscape: collect= "always"
xlink: href="# linearGradient3 304"
gradientUnits= "userSpaceOnUse " /> dient
inkscape: collect= "always" "#linearGradien t3304" ent3498" "userSpaceOnUse " rm="translate( -200.26179, -44.443863) " /> collect= "always" "#linearGradien t3304" ent3525" "userSpaceOnUse " rm="translate( -200.26179, -44.443863) " collect= "always"
xlink: href="# linearGradient3 546"
id="linearGrad ient3552"
x1="-48. 08326" erance= "10" pageopacity= "0.0" pageshadow= "2" cx="63. 424403" zoom="3. 6324324" cy="92. 5" document- units=" px" current- layer=" layer1" "false" window- width=" 1279" window- height= "949" window- x="1" window- height= "900" window- x="5" window- y="49" /> "metadata7" >
=== added directory 'icons/hicolor'
=== added directory 'icons/
=== added file 'icons/
Binary files icons/hicolor/
=== renamed directory 'cfg/data/
=== added directory 'icons/
=== added file 'icons/
Binary files icons/hicolor/
=== renamed directory 'cfg/data/
=== modified file 'icons/
--- cfg/data/
+++ icons/hicolor/
@@ -15,11 +15,11 @@
sodipodi:
inkscape:
version="1.0"
- sodipodi:
+ sodipodi:
inkscape:
- inkscape:
- inkscape:
- inkscape:
+ inkscape:
+ inkscape:
+ inkscape:
style=
<defs
id="defs4">
@@ -75,13 +75,6 @@
</
- <inkscape:
- sodipodi:
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:
- inkscape:
- id="perspective10" />
<linearGra
@@ -116,28 +109,6 @@
<linearGra
- xlink:href=
- id="linearGradi
- gradientUnits=
- spreadMethod="pad"
- x1="30.755842"
- y1="123.12816"
- x2="149.2892"
- y2="123.12816"
- gradientTransfo
- <linearGradient
- inkscape:
- xlink:href=
- id="linearGradi
- gradientUnits=
- gradientTransfo
- spreadMethod="pad"
- x1="30.755842"
- y1="123.12816"
- x2="149.2892"
- y2="123.12816" />
- <linearGradient
- inkscape:
@@ -175,16 +146,16 @@
objecttol
inkscape:
inkscape:
- inkscape:zoom="1"
- inkscape:
+ inkscape:
+ inkscape:cx="92.5"
inkscape:
inkscape:
inkscape:
showgrid=
width="49px"
inkscape:
- inkscape:
- inkscape:
+ inkscape:
+ inkscape:
inkscape:
<metadata
id=
=== modified file 'setup.py'
--- setup.py 2008-10-13 06:03:59 +0000
+++ setup.py 2008-10-25 13:12:21 +0000
@@ -6,7 +6,7 @@
import os
-def find_files(dirs): join('share/ entertainer' , root) join(dest_ root, root)
source_ files = [os.path.join(root, file) for file in files]
result. append( (dest, source_files)) erlib/utils/ glade/* ',
+def find_files(dirs, dest_root='share'):
'''Walk files and directories and return them in a form for data_files'''
# pylint: disable-msg=W0621
result = []
@@ -14,7 +14,7 @@
dirs = [dirs]
for dir in dirs:
for root, dirs, files in os.walk(dir):
- dest = os.path.
+ dest = os.path.
return result
@@ -32,7 +32,8 @@
'entertain
]
-data_files = find_files(['cfg', 'translations']) entertainer' ) extend( find_files( 'icons' )) share/entertain er/docs' , [
'docs/ LICENSE' ,
+data_files = find_files(['cfg', 'translations'], 'share/
+data_files.
data_files.append(
('