src/setup.py
changeset 100 43dab2ef6f1a
parent 99 a65807bd3d04
child 101 2f8c3f8783fa
equal deleted inserted replaced
99:a65807bd3d04 100:43dab2ef6f1a
     2 from distutils.core import setup
     2 from distutils.core import setup
     3 from distutils.command.install_data import install_data
     3 from distutils.command.install_data import install_data
     4 from distutils.command.install import INSTALL_SCHEMES
     4 from distutils.command.install import INSTALL_SCHEMES
     5 import sys
     5 import sys
     6 
     6 
       
     7 MODULE = 'hashcut'
     7 
     8 
     8 class osx_install_data(install_data):
     9 class osx_install_data(install_data):
     9     # On MacOS, the platform-specific lib dir is /System/Library/Framework/Python/.../
    10     # On MacOS, the platform-specific lib dir is /System/Library/Framework/Python/.../
    10     # which is wrong. Python 2.5 supplied with MacOS 10.5 has an Apple-specific fix
    11     # which is wrong. Python 2.5 supplied with MacOS 10.5 has an Apple-specific fix
    11     # for this in distutils.command.install_data#306. It fixes install_lib but not
    12     # for this in distutils.command.install_data#306. It fixes install_lib but not
    41     
    42     
    42     
    43     
    43     root_dir = os.path.dirname(__file__)
    44     root_dir = os.path.dirname(__file__)
    44     if root_dir != '':
    45     if root_dir != '':
    45         os.chdir(root_dir)
    46         os.chdir(root_dir)
    46     source_dir = 'ldt'
    47     source_dir = MODULE
    47     
    48     
    48     version_variables = {}
    49     version_variables = {}
    49     try:
    50     try:
    50         execfile(os.path.join(source_dir, "__init__.py"), version_variables)
    51         execfile(os.path.join(source_dir, "__init__.py"), version_variables)
    51     except:
    52     except:
    91                 m.write("include %s\n" % (filename))
    92                 m.write("include %s\n" % (filename))
    92     
    93     
    93     setup(
    94     setup(
    94         script_name = script_name,
    95         script_name = script_name,
    95         script_args = script_args,
    96         script_args = script_args,
    96         name='hashcut',
    97         name=MODULE,
    97         version=version,
    98         version=version,
    98         author='IRI',
    99         author='IRI',
    99         author_email='contact@iri.centrepompidou.fr',
   100         author_email='contact@iri.centrepompidou.fr',
   100         packages=packages,
   101         packages=packages,
   101         data_files=data_files,
   102         data_files=data_files,