Remove dependency on GitPython from setuptools usage
Refactor the build_manage command to import git_upstream main function to access the argparser only when the build_manage command is run instead of when it is being constructed. This removes the need for GitPython to be available for setuptools to parse the setup.py and instead is only needed when the command is executed. Change-Id: I16a7d18ad7e4cac87feb3204489727cc99c60ab5
This commit is contained in:
parent
597c7f6500
commit
661b214bfa
|
@ -29,16 +29,15 @@ class BuildManpage(Command):
|
|||
command_name = 'build_manpage'
|
||||
|
||||
def initialize_options(self):
|
||||
from git_upstream import main
|
||||
|
||||
self._output = self.distribution.get_name() + '.1'
|
||||
self._see_also = ["git:1"]
|
||||
self._today = datetime.date.today()
|
||||
self._commands, self._parser = main.get_parser()
|
||||
self._parser.formatter = ManPageFormatter()
|
||||
self._commands = self._parser = None
|
||||
|
||||
def finalize_options(self):
|
||||
pass
|
||||
from git_upstream import main
|
||||
self._commands, self._parser = main.get_parser()
|
||||
self._parser.formatter = ManPageFormatter()
|
||||
|
||||
def _markup(self, txt):
|
||||
return txt.replace('-', '\\-')
|
||||
|
|
Loading…
Reference in New Issue