From 96930c9d362549077507c35023da5319cd97f04a Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Fri, 3 Apr 2015 16:18:37 +0300 Subject: [PATCH] Moving publish command to setup.py and removing manage.py and its requirements --- VERSION | 2 +- manage.py | 27 --------------------------- requirements-maintain.txt | 1 - setup.py | 5 +++-- 4 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 manage.py delete mode 100644 requirements-maintain.txt diff --git a/VERSION b/VERSION index f38fc539..0a1ffad4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.7.3 +0.7.4 diff --git a/manage.py b/manage.py deleted file mode 100644 index b57431c8..00000000 --- a/manage.py +++ /dev/null @@ -1,27 +0,0 @@ -"""CLI Commands.""" - -import os -from setup import version -from manager import Manager - - -manager = Manager() - - -@manager.command -def publish(with_tag=True): - """Publishg current version to PyPi.""" - os.system('python setup.py sdist upload') - if with_tag: - tag() - - -@manager.command -def tag(): - """Make tag from current version.""" - os.system('git tag -a {0} -m \'version {0}\''.format(version)) - os.system('git push --tags') - - -if __name__ == '__main__': - manager.main() diff --git a/requirements-maintain.txt b/requirements-maintain.txt deleted file mode 100644 index d8d78add..00000000 --- a/requirements-maintain.txt +++ /dev/null @@ -1 +0,0 @@ -manage.py diff --git a/setup.py b/setup.py index 3d578249..8e07535a 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ class PublishCommand(Command): """Setuptools `publish` command.""" description = "Publish current distribution to PyPi and create tag" - user_options = tuple() + user_options = [] def initialize_options(self): """Init options.""" @@ -43,7 +43,8 @@ class PublishCommand(Command): def run(self): """Command execution.""" - os.system('python setup.py sdist upload') + self.run_command('sdist') + self.run_command('upload') os.system('git tag -a {0} -m \'version {0}\''.format(version)) os.system('git push --tags')