Django

Code

Changeset 8019

Show
Ignore:
Timestamp:
07/21/08 11:30:32 (5 months ago)
Author:
jacob
Message:

Fixed #7414: fixed setup.py on OSX 10.5. Thanks, ajs.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/AUTHORS

    r8016 r8019  
    4242answer newbie questions, and generally made Django that much better: 
    4343 
     44    ajs <adi@sieker.info> 
    4445    alang@bright-green.com 
    4546    Marty Alchin <gulopine@gamemusic.org> 
  • django/trunk/setup.py

    r7680 r8019  
    11from distutils.core import setup 
     2from distutils.command.install_data import install_data 
    23from distutils.command.install import INSTALL_SCHEMES 
    34import os 
    45import sys 
     6 
     7class osx_install_data(install_data): 
     8    # On MacOS the plattform specific lib dir is /System/Library/Framework/Python/.../ 
     9    # which is wrong. Python 2.5 supplied with MacOS 10.5 has an Aplle specific fix 
     10    # for this in distutils.command.install_data#306 It fixes install_lib but not 
     11    # install_data, which is why we roll our own install_data class. 
     12 
     13    def finalize_options (self): 
     14        # By the time finalize_options is called install.install_lib is set to the 
     15        # fixed directory. so we set the installdir for to install_lib, the 
     16        # install_data class uses ('install_data', 'install_dir') instead. 
     17        self.set_undefined_options('install', ('install_lib', 'install_dir')) 
     18        install_data.finalize_options(self) 
     19 
     20if sys.platform == "darwin":  
     21    cmdclasses = {'install_data': osx_install_data }  
     22else:  
     23    cmdclasses = {'install_data': install_data }  
    524 
    625def fullsplit(path, result=None): 
     
    5675    description = 'A high-level Python Web framework that encourages rapid development and clean, pragmatic design.', 
    5776    packages = packages, 
     77    cmdclass = cmdclasses, 
    5878    data_files = data_files, 
    5979    scripts = ['django/bin/django-admin.py'],