~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Alexander Belchenko
  • Date: 2007-08-01 15:06:30 UTC
  • mto: This revision was merged to the branch mainline in revision 2666.
  • Revision ID: bialix@ukr.net-20070801150630-yutqeweo2akutdc0
allow ``easy_install bzr`` runs without fatal errors. (Alexander Belchenko, #125521)

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
 
104
104
        if sys.platform == "win32":
105
105
            try:
106
 
                scripts_dir = self.install_dir
 
106
                scripts_dir = os.path.join(sys.prefix, 'Scripts')
107
107
                script_path = self._quoted_path(os.path.join(scripts_dir,
108
108
                                                             "bzr"))
109
109
                python_exe = self._quoted_path(sys.executable)
110
110
                args = self._win_batch_args()
111
111
                batch_str = "@%s %s %s" % (python_exe, script_path, args)
112
 
                batch_path = script_path + ".bat"
 
112
                batch_path = os.path.join(self.install_dir, "bzr.bat")
113
113
                f = file(batch_path, "w")
114
114
                f.write(batch_str)
115
115
                f.close()
283
283
          zipfile='lib/library.zip')
284
284
 
285
285
else:
 
286
    # ad-hoc for easy_install
 
287
    DATA_FILES = []
 
288
    if not 'bdist_egg' in sys.argv:
 
289
        # generate and install bzr.1 only with plain install, not easy_install one
 
290
        DATA_FILES = [('man/man1', ['bzr.1'])]
 
291
 
286
292
    # std setup
287
293
    ARGS = {'scripts': ['bzr'],
288
 
            'data_files': [('man/man1', ['bzr.1'])],
 
294
            'data_files': DATA_FILES,
289
295
            'cmdclass': command_classes,
290
296
            'ext_modules': ext_modules,
291
297
           }