summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorBen Brown <ben@demerara.io>2022-02-05 15:47:35 +0000
committerBen Brown <ben@demerara.io>2022-02-05 16:12:52 +0000
commitcad5b2c2bbbac7015f3f2bf66f8af01bdbf943f8 (patch)
treee45e09fb18593b9dcf2c0d039d95526f4df0dcbb /setup.py
parentd67c456242e7c05eb77f0dc78856c1d704fba846 (diff)
downloadlorry-cad5b2c2bbbac7015f3f2bf66f8af01bdbf943f8.tar.gz
Commit changes from from black and isort
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py98
1 files changed, 52 insertions, 46 deletions
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,
+ },
+)