- Timestamp:
- 09/03/06 17:37:17 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/setup.py
r2909 r3005 28 28 import glob 29 29 import os 30 import stat 30 31 import shutil 31 32 try : 32 33 from distutils.core import setup 34 from distutils.command.install_data import install_data 33 35 except ImportError, msg : 34 36 sys.stderr.write("%s\n" % msg) … … 108 110 data_files.append((sqlitedirectory, ["initscripts/sqlite/README.sqlite", "initscripts/sqlite/pykota-sqlite.sql"])) 109 111 112 class MyInstallData(install_data) : 113 """A special class to ensure permissions are OK on the cupspykota backend.""" 114 def run(self) : 115 """Launches the normal installation and then tweaks permissions.""" 116 install_data.run(self) 117 if not self.dry_run : 118 cupspykota = [ filename for filename in self.get_outputs() if filename.endswith("cupspykota") ][0] 119 os.chmod(cupspykota, stat.S_IRWXU) 120 110 121 os.umask(022) 111 122 setup(name = "pykota", version = __version__, … … 121 132 "bin/pykosd", "bin/edpykota", "bin/repykota", \ 122 133 "bin/warnpykota", "bin/pykotme", "bin/pkprinters" ], 123 data_files = data_files) 134 data_files = data_files, 135 cmdclass = { "install_data" : MyInstallData })