Moving publish command to setup.py and removing manage.py and its requirements

This commit is contained in:
Roman Mogilatov 2015-04-03 16:18:37 +03:00
parent fb40c949e4
commit 96930c9d36
4 changed files with 4 additions and 31 deletions

View File

@ -1 +1 @@
0.7.3 0.7.4

View File

@ -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()

View File

@ -1 +0,0 @@
manage.py

View File

@ -33,7 +33,7 @@ class PublishCommand(Command):
"""Setuptools `publish` command.""" """Setuptools `publish` command."""
description = "Publish current distribution to PyPi and create tag" description = "Publish current distribution to PyPi and create tag"
user_options = tuple() user_options = []
def initialize_options(self): def initialize_options(self):
"""Init options.""" """Init options."""
@ -43,7 +43,8 @@ class PublishCommand(Command):
def run(self): def run(self):
"""Command execution.""" """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 tag -a {0} -m \'version {0}\''.format(version))
os.system('git push --tags') os.system('git push --tags')