/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Jelmer Vernooij
  • Date: 2019-05-20 03:57:29 UTC
  • mto: This revision was merged to the branch mainline in revision 7328.
  • Revision ID: jelmer@jelmer.uk-20190520035729-9rxvefxkvbbivygy
use default_user_agent function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/bin/env python3
 
1
#! /usr/bin/env python
2
2
 
3
3
"""Installation script for brz.
4
4
Run it with
65
65
    'install_requires': [
66
66
        'configobj',
67
67
        'six>=1.9.0',
68
 
        'patiencediff',
69
68
        # Technically, Breezy works without these two dependencies too. But there's
70
69
        # no way to enable them by default and let users opt out.
71
70
        'fastimport>=0.9.8',
72
 
        'dulwich>=0.19.12',
 
71
        'dulwich>=0.19.11',
73
72
        ],
74
73
    'extras_require': {
75
74
        'fastimport': [],
150
149
                script_path = self._quoted_path(os.path.join(scripts_dir,
151
150
                                                             "brz"))
152
151
                python_exe = self._quoted_path(sys.executable)
153
 
                batch_str = "@%s %s %%*" % (python_exe, script_path)
 
152
                args = self._win_batch_args()
 
153
                batch_str = "@%s %s %s" % (python_exe, script_path, args)
154
154
                batch_path = os.path.join(self.install_dir, "brz.bat")
155
155
                with open(batch_path, "w") as f:
156
156
                    f.write(batch_str)
164
164
            return '"' + path + '"'
165
165
        else:
166
166
            return path
 
167
 
 
168
    def _win_batch_args(self):
 
169
        from breezy.win32utils import winver
 
170
        if winver == 'Windows NT':
 
171
            return '%*'
 
172
        else:
 
173
            return '%1 %2 %3 %4 %5 %6 %7 %8 %9'
167
174
#/class my_install_scripts
168
175
 
169
176
 
327
334
    add_cython_extension('breezy.bzr._dirstate_helpers_pyx')
328
335
    add_cython_extension('breezy._readdir_pyx')
329
336
add_cython_extension('breezy.bzr._chk_map_pyx')
 
337
ext_modules.append(Extension('breezy._patiencediff_c',
 
338
                             ['breezy/_patiencediff_c.c']))
330
339
add_cython_extension('breezy.bzr._btree_serializer_pyx')
331
340
 
332
341