[gentoo-commits] proj/catalyst:master commit in: bin/, /, catalyst/
commit: 7ac226844fa1a34cad29ca6b068c13a8f67305a9 Author: Matt Turner gentoo org> AuthorDate: Sat Mar 28 06:49:05 2020 + Commit: Matt Turner gentoo org> CommitDate: Sat Mar 28 07:34:51 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=7ac22684 catalyst: Remove left over $Id$ Signed-off-by: Matt Turner gentoo.org> AUTHORS | 2 -- README | 2 -- TODO | 2 -- bin/catalyst | 1 - catalyst/main.py | 1 - 5 files changed, 8 deletions(-) diff --git a/AUTHORS b/AUTHORS index 3bf969bd..41366b8c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,3 @@ -# $Id$ - The copyright for catalyst is held by the Gentoo Foundation and by each of the individual contributors. diff --git a/README b/README index 530abb35..6dc6a149 100644 --- a/README +++ b/README @@ -1,5 +1,3 @@ -# $Id$ - Licensing diff --git a/TODO b/TODO index a2ee05dd..bf397840 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,3 @@ -# $Id$ - This file is a rough list of changes that need to be made to catalyst. Global: diff --git a/bin/catalyst b/bin/catalyst index 72a4cb4d..d0d3d639 100755 --- a/bin/catalyst +++ b/bin/catalyst @@ -5,7 +5,6 @@ # Release Engineering Team # Andrew Gaffney # Chris Gianelloni -# $Id$ from __future__ import print_function diff --git a/catalyst/main.py b/catalyst/main.py index 01c456ea..e15d67d9 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -4,7 +4,6 @@ # Release Engineering Team # Andrew Gaffney # Chris Gianelloni -# $Id$ import argparse import datetime
[gentoo-commits] proj/catalyst:master commit in: bin/, doc/, /, catalyst/
commit: 8f86a7f6e890b03ac24a94d567df79a64ccf9e74 Author: Matt Turner gentoo org> AuthorDate: Sat Mar 28 07:02:37 2020 + Commit: Matt Turner gentoo org> CommitDate: Sat Mar 28 07:35:26 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8f86a7f6 catalyst: Remove unnecessary future imports Catalyst has been python 3-only for a while. Signed-off-by: Matt Turner gentoo.org> bin/catalyst | 2 -- bin/catalyst.git | 2 -- bin/pylint | 2 -- catalyst/log.py | 2 -- doc/make_target_table.py | 2 -- setup.py | 2 -- 6 files changed, 12 deletions(-) diff --git a/bin/catalyst b/bin/catalyst index d3448fd8..228a913e 100755 --- a/bin/catalyst +++ b/bin/catalyst @@ -1,7 +1,5 @@ #!/usr/bin/python -OO -from __future__ import print_function - import sys # This block ensures that ^C interrupts are handled quietly. diff --git a/bin/catalyst.git b/bin/catalyst.git index eb6234b9..733ade15 100755 --- a/bin/catalyst.git +++ b/bin/catalyst.git @@ -5,8 +5,6 @@ """Run catalyst from git using local modules/scripts.""" -from __future__ import print_function - import os import sys import tempfile diff --git a/bin/pylint b/bin/pylint index b0018278..6c718134 100755 --- a/bin/pylint +++ b/bin/pylint @@ -4,8 +4,6 @@ """Run pylint with the right settings.""" -from __future__ import print_function - import os import sys diff --git a/catalyst/log.py b/catalyst/log.py index d640dece..7956c28f 100644 --- a/catalyst/log.py +++ b/catalyst/log.py @@ -8,8 +8,6 @@ another level "notice" between warning & info, and all output goes through the "catalyst" logger. """ -from __future__ import print_function - import logging import logging.handlers import os diff --git a/doc/make_target_table.py b/doc/make_target_table.py index c4b49ad9..d1f97c9b 100755 --- a/doc/make_target_table.py +++ b/doc/make_target_table.py @@ -8,8 +8,6 @@ # source the testpath file then run "doc/make_target_table.py" -from __future__ import print_function - import glob import locale import os diff --git a/setup.py b/setup.py index c6b52dcf..c6553b5d 100755 --- a/setup.py +++ b/setup.py @@ -1,8 +1,6 @@ #!/usr/bin/env python """Catalyst is a release building tool used by Gentoo Linux""" -from __future__ import print_function - import codecs as _codecs from distutils.core import setup as _setup, Command as _Command from email.utils import parseaddr as _parseaddr
[gentoo-commits] proj/catalyst:master commit in: bin/
commit: 24e7da46a9a6521ff89090c555babd12cfbe589a Author: Mike Frysinger gentoo org> AuthorDate: Thu Oct 29 00:29:10 2015 + Commit: Mike Frysinger gentoo org> CommitDate: Thu Nov 19 03:40:51 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=24e7da46 catalyst: switch to common python entry Since the catalyst code base supports py2 & py3, we no longer need to hardcode py2 in the shebang. bin/catalyst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/catalyst b/bin/catalyst index 1557ab8..24122b2 100755 --- a/bin/catalyst +++ b/bin/catalyst @@ -1,4 +1,4 @@ -#!/usr/bin/python2 -OO +#!/usr/bin/python -OO # Maintained in full by: # Catalyst Team
[gentoo-commits] proj/catalyst:master commit in: bin/
commit: 16f3af32eb645f3485e9e54b2bb9d128503fa9ce Author: Mike Frysinger gentoo org> AuthorDate: Thu Oct 29 00:29:52 2015 + Commit: Mike Frysinger gentoo org> CommitDate: Thu Nov 19 03:40:51 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=16f3af32 catalyst: add a wrapper for executing directly out of git This is a smaller wrapper to set up the environment (both python and some config options) so that all the code is used from the git repo. This way you don't have to install it in order to test things. bin/catalyst.git | 52 1 file changed, 52 insertions(+) diff --git a/bin/catalyst.git b/bin/catalyst.git new file mode 100755 index 000..eb6234b --- /dev/null +++ b/bin/catalyst.git @@ -0,0 +1,52 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +"""Run catalyst from git using local modules/scripts.""" + +from __future__ import print_function + +import os +import sys +import tempfile + +from snakeoil import process + + +def main(argv): + """The main entry point""" + source_root = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + + pympath = source_root + pythonpath = os.environ.get('PYTHONPATH') + if pythonpath is None: + pythonpath = pympath + else: + pythonpath = pympath + ':' + pythonpath + os.environ['PYTHONPATH'] = pythonpath + + with tempfile.NamedTemporaryFile(prefix='catalyst.conf.') as conf: + # Set up a config file with paths to the local tree. + conf.write( + ('sharedir=%(source_root)s\n' +'shdir=%(source_root)s/targets\n' +'envscript=%(source_root)s/etc/catalystrc\n' +% {'source_root': source_root}).encode('utf8') + ) + conf.flush() + argv = [ + '--config', os.path.join(source_root, 'etc', 'catalyst.conf'), + '--config', conf.name, + ] + argv + + cmd = [os.path.join(source_root, 'bin', 'catalyst')] + pid = os.fork() + if pid == 0: + os.execvp(cmd[0], cmd + argv) + (_pid, status) = os.waitpid(pid, 0) + process.exit_as_status(status) + + +if __name__ == '__main__': + main(sys.argv[1:])
[gentoo-commits] proj/catalyst:master commit in: bin/
commit: ea895af0e5a9f22f71ba695dcb7fd6c8f6f0ce70 Author: Mike Frysinger gentoo org> AuthorDate: Sun Oct 11 18:19:13 2015 + Commit: Mike Frysinger gentoo org> CommitDate: Sun Oct 11 18:19:13 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ea895af0 pylint: scan all modules by default Add a quick shortcut to scan all the modules in the tree. bin/pylint | 17 + 1 file changed, 17 insertions(+) diff --git a/bin/pylint b/bin/pylint index 1a50609..b001827 100755 --- a/bin/pylint +++ b/bin/pylint @@ -10,10 +10,27 @@ import os import sys +def find_all_modules(source_root): + """Locate all python modules in the tree for scanning""" + ret = [] + + for root, _dirs, files in os.walk(source_root, topdown=False): + # Add all of the .py modules in the tree. + ret += [os.path.join(root, x) for x in files if x.endswith('.py')] + + # Add the main scripts that don't end in .py. + ret += [os.path.join(source_root, 'bin', x) for x in ('catalyst', 'pylint')] + + return ret + + def main(argv): """The main entry point""" source_root = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + if not argv: + argv = find_all_modules(source_root) + pympath = source_root pythonpath = os.environ.get('PYTHONPATH') if pythonpath is None:
[gentoo-commits] proj/catalyst:master commit in: bin/, doc/
commit: 41b0bf3647474dcaf15bbf2138446fb50b665371 Author: Mike Frysinger gentoo org> AuthorDate: Tue Oct 6 14:18:47 2015 + Commit: Mike Frysinger gentoo org> CommitDate: Tue Oct 6 14:18:47 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=41b0bf36 lint: mark unused func args Since these aren't used, the linter will warn, but these are callbacks that expect a certain API, so add a _ prefix to quiet it down. bin/catalyst | 2 +- doc/make_target_table.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/catalyst b/bin/catalyst index 19f5289..d0bc153 100755 --- a/bin/catalyst +++ b/bin/catalyst @@ -16,7 +16,7 @@ import sys try: import signal - def exithandler(signum,frame): + def exithandler(_signum, _frame): signal.signal(signal.SIGINT, signal.SIG_IGN) signal.signal(signal.SIGTERM, signal.SIG_IGN) print() diff --git a/doc/make_target_table.py b/doc/make_target_table.py index 9e7ebe8..f127c37 100755 --- a/doc/make_target_table.py +++ b/doc/make_target_table.py @@ -16,7 +16,7 @@ import glob import re -def key_netboot_before_netboot2((target_name, module)): +def key_netboot_before_netboot2((target_name, _module)): return target_name + '1'
[gentoo-commits] proj/catalyst:master commit in: /, bin/
commit: cdfa003b267c02828291c0228d33ea845cb79946 Author: Mike Frysinger gentoo org> AuthorDate: Tue Oct 6 03:19:43 2015 + Commit: Mike Frysinger gentoo org> CommitDate: Tue Oct 6 18:03:15 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=cdfa003b pylint: add a helper for linting code A bunch of warnings are left disabled because there's too many violations in the current code base. Hopefully we can get to a point where everyone uses this though and we can start enabling more and more. The code base is "clean" right now in the sense that running pylint will not produce any output. But we should start removing violations one by one and re-enable the warning class as we go. .pylintrc | 249 + bin/pylint | 31 2 files changed, 280 insertions(+) diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 000..b3327cf --- /dev/null +++ b/.pylintrc @@ -0,0 +1,249 @@ +[MASTER] + +# Profiled execution. +profile=no + +# Add files or directories to the blacklist. They should be base names, not +# paths. +ignore= + +# Pickle collected data for later comparisons. +persistent=yes + +# List of plugins (as comma separated values of python modules names) to load, +# usually to register additional checkers. +load-plugins= + + +[MESSAGES CONTROL] + +# Enable the message, report, category or checker with the given id(s). You can +# either give multiple identifier separated by comma (,) or put this option +# multiple time. +#enable= + +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifier separated by comma (,) or put this option +# multiple time (only on the command line, not in the configuration file where +# it should appear only once). +# We should clean up things so we can enable: +# missing-docstring -- add lots of docstrings everywhere! +# bad-whitespace -- fix spacing everywhere +# bad-continuation -- might be hard with tab indentation policy +# invalid-name -- need to manage constants better +# line-too-long -- figure out a length and stick to it +# unidiomatic-typecheck -- convert to isinstance +# redefined-outer-name -- clean up code to not do this +# super-init-not-called -- fix the classes __init__ structure +# no-init -- update classes w/missing __init__ functions +disable=missing-docstring, too-many-lines, too-many-branches, too-many-statements, too-few-public-methods, too-many-instance-attributes, too-many-public-methods, too-many-locals, too-many-arguments, locally-enabled, locally-disabled, fixme, broad-except, bad-whitespace, bad-continuation, invalid-name, line-too-long, unidiomatic-typecheck, redefined-outer-name, super-init-not-called, no-init + + +[REPORTS] + +# Set the output format. Available formats are text, parseable, colorized, msvs +# (visual studio) and html +output-format=text + +# Put messages in a separate file for each module / package specified on the +# command line instead of printing them on stdout. Reports (if any) will be +# written in a file name "pylint_global.[txt|html]". +files-output=no + +# Tells whether to display a full report or only the messages +reports=no + +# Python expression which should return a note less than 10 (10 is the highest +# note). You have access to the variables errors warning, statement which +# respectively contain the number of errors / warnings messages and the total +# number of statements analyzed. This is used by the global evaluation report +# (RP0004). +evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) + +# Add a comment according to your evaluation note. This is used by the global +# evaluation report (RP0004). +comment=no + + +[FORMAT] + +# Maximum number of characters on a single line. +max-line-length=80 + +# Maximum number of lines in a module +max-module-lines=1000 + +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string='\t' + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +notes=FIXME,XXX,TODO + + +[VARIABLES] + +# Tells whether we should check for unused import in __init__ files. +init-import=no + +# A regular expression matching the beginning of the name of dummy variables +# (i.e. not used). +dummy-variables-rgx=_|dummy + +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid to define new builtins when possible. +additional-builtins= + + +[TYPECHECK] + +# Tells whether missing members accessed in mixin class should be ignored. A +# mixin class is detected if its name ends with "mixin" (case insensitive). +ignore-mixin-members=yes + +# List of classes names for which member attributes should not be checked +# (useful for classes with attributes dynamically set). +ignored-classes=SQLObject,twisted.internet.reactor,hashlib,google.appengine.api.memcache + +# When zope mode
[gentoo-commits] proj/catalyst:master commit in: bin/
commit: 3daff314c8d4927d13c663d921a4e1952ea038d1 Author: Mike Frysinger gentoo org> AuthorDate: Tue Oct 6 15:54:06 2015 + Commit: Mike Frysinger gentoo org> CommitDate: Tue Oct 6 15:54:06 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3daff314 catalyst: clean up unused module imports bin/catalyst | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/catalyst b/bin/catalyst index d0bc153..577e899 100755 --- a/bin/catalyst +++ b/bin/catalyst @@ -32,8 +32,6 @@ except KeyboardInterrupt: from catalyst.main import main -from catalyst import __maintainer__ -from catalyst import __version__ try: main()