From cad5b2c2bbbac7015f3f2bf66f8af01bdbf943f8 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Sat, 5 Feb 2022 15:47:35 +0000 Subject: Commit changes from from black and isort --- setup.py | 98 ++++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 52 insertions(+), 46 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index ec0d3ca..3946308 100644 --- a/setup.py +++ b/setup.py @@ -14,54 +14,54 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -'''Setup.py for lorry.''' +"""Setup.py for lorry.""" import compileall -from distutils.core import setup -from distutils.cmd import Command -from distutils.command.build import build -from distutils.command.clean import clean -from distutils.command.install import install import distutils.dir_util import glob import os import shutil import subprocess import sys +from distutils.cmd import Command +from distutils.command.build import build +from distutils.command.clean import clean +from distutils.command.install import install +from distutils.core import setup class Build(build): - def run(self): build.run(self) - compileall.compile_dir('hg-fast-export/plugins') + compileall.compile_dir("hg-fast-export/plugins") - print('building manpages') - for x in ['lorry']: - with open('%s.1' % x, 'w') as f: - subprocess.check_call(['python3', x, - '--generate-manpage=%s.1.in' % x, - '--output=%s.1' % x], stdout=f) + print("building manpages") + for x in ["lorry"]: + with open("%s.1" % x, "w") as f: + subprocess.check_call( + [ + "python3", + x, + "--generate-manpage=%s.1.in" % x, + "--output=%s.1" % x, + ], + stdout=f, + ) class Clean(clean): - clean_files = [ - '.coverage', - 'build', - 'lorry.1' - ] + clean_files = [".coverage", "build", "lorry.1"] clean_globs = [ - '*/*.py[co]', - 'hg-fast-export/plugins/*/__pycache__', + "*/*.py[co]", + "hg-fast-export/plugins/*/__pycache__", ] def run(self): clean.run(self) - itemses = ([self.clean_files] + - [glob.glob(x) for x in self.clean_globs]) + itemses = [self.clean_files] + [glob.glob(x) for x in self.clean_globs] for items in itemses: for filename in items: if os.path.isdir(filename): @@ -72,8 +72,7 @@ class Clean(clean): class Check(Command): - user_options = [ - ] + user_options = [] def initialize_options(self): pass @@ -82,7 +81,7 @@ class Check(Command): pass def run(self): - subprocess.check_call(['./check']) + subprocess.check_call(["./check"]) class Install(install): @@ -91,30 +90,37 @@ class Install(install): # Install hg-fast-export plugins in a private directory distutils.dir_util.copy_tree( - 'hg-fast-export/plugins', - os.path.join(self.install_data, - 'share/lorry/hg-fast-export/plugins')) + "hg-fast-export/plugins", + os.path.join(self.install_data, "share/lorry/hg-fast-export/plugins"), + ) if sys.version_info < (3, 6): print("lorry requires Python 3.6+", file=sys.stderr) sys.exit(1) -setup(name='lorry', - description='FIXME', - long_description='''\ +setup( + name="lorry", + description="FIXME", + long_description="""\ FIXME -''', - author='Baserock', - author_email='baserock-dev@baserock.org', - url='http://wiki.baserock.org/', - scripts=['lorry', 'lorry.tar-importer', 'lorry.gzip-importer', - 'lorry.zip-importer', 'lorry-ssh-wrapper', - 'lorry.raw-file-importer'], - data_files=[('share/man/man1', glob.glob('*.[1-8]'))], - cmdclass={ - 'build': Build, - 'check': Check, - 'clean': Clean, - 'install': Install, - }) +""", + author="Baserock", + author_email="baserock-dev@baserock.org", + url="http://wiki.baserock.org/", + scripts=[ + "lorry", + "lorry.tar-importer", + "lorry.gzip-importer", + "lorry.zip-importer", + "lorry-ssh-wrapper", + "lorry.raw-file-importer", + ], + data_files=[("share/man/man1", glob.glob("*.[1-8]"))], + cmdclass={ + "build": Build, + "check": Check, + "clean": Clean, + "install": Install, + }, +) -- cgit v1.2.1