~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Robert Collins
  • Date: 2006-06-04 17:34:18 UTC
  • mto: This revision was merged to the branch mainline in revision 2442.
  • Revision ID: robertc@robertcollins.net-20060604173418-51fbd7c12775039e
First cut at adding pyrex facilities.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
## Setup
81
81
########################
82
82
 
 
83
command_classes = {'install_scripts': my_install_scripts,
 
84
                  'build': bzr_build}
 
85
ext_modules = []
 
86
try:
 
87
    from Pyrex.Distutils import build_ext
 
88
except ImportError:
 
89
    # try to build the extension from the prior generated source.
 
90
    print ("Pyrex not available, while bzr will build"
 
91
           ", you cannot modify the C extensions.")
 
92
    from distutils.command import build_ext
 
93
    from distutils.extension import Extension
 
94
    #ext_modules.append(
 
95
    #    Extension("bzrlib.modulename", ["bzrlib/foo.c"], libraries = []))
 
96
else:
 
97
    from distutils.extension import Extension
 
98
    #ext_modules.append(
 
99
    #    Extension("bzrlib.modulename", ["bzrlib/foo.pyx"], libraries = []))
 
100
command_classes['build_ext'] = build_ext
 
101
 
 
102
 
83
103
setup(name='bzr',
84
104
      version='0.8pre',
85
105
      author='Martin Pool',
116
136
                'bzrlib.bundle.serializer'
117
137
                ],
118
138
      scripts=['bzr'],
119
 
      cmdclass={'install_scripts': my_install_scripts, 'build': bzr_build},
 
139
      cmdclass=command_classes,
120
140
      data_files=[('man/man1', ['bzr.1'])],
 
141
      ext_modules=ext_modules,
121
142
    #   todo: install the txt files from bzrlib.doc.api.
122
143
     )