install scripts
authorTimo Savola <tsavola@movial.fi>
Fri, 4 Apr 2008 07:43:58 +0000 (10:43 +0300)
committerTimo Savola <tsavola@movial.fi>
Fri, 4 Apr 2008 07:43:58 +0000 (10:43 +0300)
bin/matrix
setup.py

index 94f0ccab5548b6d20e39d1291a8ae8f3a8c0d102..b7d0d88b072a62660eece006a226a3579afaf6e8 100755 (executable)
@@ -13,6 +13,8 @@ from matrix import matrix, config
 
 if path and os.path.exists(os.path.join(path, 'scripts', 'matrix.mak')):
        config.script_dir = os.path.join(path, 'scripts')
+else:
+       config.script_dir = os.path.join(sys.prefix, 'share', 'matrix', 'scripts')
 
 try:
        matrix.main()
index 80847763807f72129953bacc844097d5ba410120..02e684ab99ddea9f6141b4629839d93cea18abae 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
 from distutils.core import setup
+from glob import glob
 
 setup(
        name='matrix',
@@ -8,4 +9,5 @@ setup(
        license='GPL',
        packages=['matrix'],
        scripts=['bin/matrix', 'bin/matrix-graph'],
+       data_files=[('share/scripts', glob('scripts/*.mak'))],
 )