/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: 2018-11-06 01:18:08 UTC
  • mfrom: (7143 work)
  • mto: This revision was merged to the branch mainline in revision 7151.
  • Revision ID: jelmer@jelmer.uk-20181106011808-y870f4vq0ork3ahu
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
def get_long_description():
25
25
    dirname = os.path.dirname(__file__)
26
 
    readme = os.path.join(dirname, 'README')
27
 
    with open(readme, 'rb') as f:
 
26
    readme = os.path.join(dirname, 'README.rst')
 
27
    with open(readme, 'r') as f:
28
28
        return f.read()
29
29
 
30
30
 
55
55
        'Topic :: Software Development :: Version Control',
56
56
        ],
57
57
    'install_requires': [
 
58
        'configobj',
58
59
        'six>=1.9.0',
 
60
        # Technically, Breezy works without these two dependencies too. But there's
 
61
        # no way to enable them by default and let users opt out.
 
62
        'fastimport>=0.9.8',
 
63
        'dulwich>=0.19.1',
59
64
        ],
60
65
    'extras_require': {
61
 
        'fastimport': ['fastimport'],
 
66
        'fastimport': [],
 
67
        'git': [],
62
68
        },
 
69
    'tests_require': [
 
70
        'testtools',
 
71
    ],
63
72
}
64
73
 
65
74
# The list of packages is automatically generated later. Add other things
66
 
# that are part of BZRLIB here.
67
 
BZRLIB = {}
 
75
# that are part of BREEZY here.
 
76
BREEZY = {}
68
77
 
69
78
PKG_DATA = {# install files from selftest suite
70
79
            'package_data': {'breezy': ['doc/api/*.txt',
103
112
    return sorted(packages)
104
113
 
105
114
 
106
 
BZRLIB['packages'] = get_breezy_packages()
 
115
BREEZY['packages'] = get_breezy_packages()
107
116
 
108
117
 
109
118
from distutils import log
133
142
                args = self._win_batch_args()
134
143
                batch_str = "@%s %s %s" % (python_exe, script_path, args)
135
144
                batch_path = os.path.join(self.install_dir, "brz.bat")
136
 
                with file(batch_path, "w") as f:
 
145
                with open(batch_path, "w") as f:
137
146
                    f.write(batch_str)
138
147
                print(("Created: %s" % batch_path))
139
148
            except Exception:
488
497
        return docs
489
498
 
490
499
    # python's distutils-based win32 installer
491
 
    ARGS = {'scripts': ['brz', 'tools/win32/brz-win32-bdist-postinstall.py'],
 
500
    ARGS = {'scripts': [ 'brz', 'tools/win32/brz-win32-bdist-postinstall.py'],
492
501
            'ext_modules': ext_modules,
493
502
            # help pages
494
503
            'data_files': find_docs(),
497
506
           }
498
507
 
499
508
    ARGS.update(META_INFO)
500
 
    ARGS.update(BZRLIB)
 
509
    ARGS.update(BREEZY)
501
510
    PKG_DATA['package_data']['breezy'].append('locale/*/LC_MESSAGES/*.mo')
502
511
    ARGS.update(PKG_DATA)
503
512
 
563
572
    gui_target = copy.copy(target)
564
573
    gui_target.dest_base = "bzrw"
565
574
 
566
 
    packages = BZRLIB['packages']
 
575
    packages = BREEZY['packages']
567
576
    packages.remove('breezy')
568
577
    packages = [i for i in packages if not i.startswith('breezy.plugins')]
569
578
    includes = []
734
743
    if not 'bdist_egg' in sys.argv:
735
744
        # generate and install brz.1 only with plain install, not the
736
745
        # easy_install one
737
 
        DATA_FILES = [('man/man1', ['brz.1'])]
 
746
        DATA_FILES = [('man/man1', ['brz.1', 'breezy/git/git-remote-bzr.1'])]
738
747
 
739
748
    DATA_FILES = DATA_FILES + I18N_FILES
740
749
    # std setup
741
 
    ARGS = {'scripts': ['brz'],
 
750
    ARGS = {'scripts': ['brz',
 
751
                        # TODO(jelmer): Only install the git scripts if
 
752
                        # Dulwich was found.
 
753
                        'breezy/git/git-remote-bzr',
 
754
                        'breezy/git/bzr-receive-pack',
 
755
                        'breezy/git/bzr-upload-pack'],
742
756
            'data_files': DATA_FILES,
743
757
            'cmdclass': command_classes,
744
758
            'ext_modules': ext_modules,
745
759
           }
746
760
 
747
761
    ARGS.update(META_INFO)
748
 
    ARGS.update(BZRLIB)
 
762
    ARGS.update(BREEZY)
749
763
    ARGS.update(PKG_DATA)
750
764
 
751
765
    if __name__ == '__main__':