diff --git a/setup.py b/setup.py index 9607f2c..61a740a 100644 --- a/setup.py +++ b/setup.py @@ -41,16 +41,17 @@ about = {} with open(os.path.join(here, NAME, "__version__.py")) as f: exec(f.read(), about) -def status(s): - """Prints things in bold.""" - print('\033[1m{0}\033[0m'.format(s)) - class PublishCommand(Command): """Support setup.py publish.""" description = "Build and publish the package." user_options = [] + + @staticmethod + def status(s): + """Prints things in bold.""" + print('\033[1m{0}\033[0m'.format(s)) def initialize_options(self): pass @@ -60,15 +61,15 @@ class PublishCommand(Command): def run(self): try: - status('Removing previous builds...') + self.status('Removing previous builds...') rmtree(os.sep.join(('.', 'dist'))) except FileNotFoundError: pass - status('Building Source and Wheel (universal) distribution...') + self.status('Building Source and Wheel (universal) distribution...') os.system("{0} setup.py sdist bdist_wheel --universal ".format(sys.executable)) - status('Uploading the package to PyPi via Twine...') + self.status('Uploading the package to PyPi via Twine...') os.system("twine upload dist/*") sys.exit()