Skip to content

Commit

Permalink
Use paver instead of plain setup.py.
Browse files Browse the repository at this point in the history
Add pavement independent paver-minilib, some dev operations to
operations. Assign authorship to Crystalnix.
  • Loading branch information
EvgeneOskin committed Jan 26, 2016
1 parent 6a6837b commit 332ad89
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 83 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ dist
*.egg-info
/build
.ropeproject
.eggs
6 changes: 5 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
include README.rst LICENSE requirements.txt
include README.rst
include LICENSE
include setup.py
include pavement.py
include paver-minilib.zip
99 changes: 99 additions & 0 deletions pavement.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
from paver.easy import * # noqa
from paver.setuputils import setup
from setuptools import find_packages

import sys

sys.path.append('.')


def get_version():
from serverauditor_sshconfig import __version__
return '.'.join(map(str, __version__))


requires = [
'cliff==1.15',
'stevedore==1.10.0',
'requests==2.7.0',
'pycrypto==2.6',
'six==1.10.0',
'pyopenssl',
'ndg-httpsclient',
'pyasn1',
]

handlers = [
'sync = serverauditor_sshconfig.sync.commands:SyncCommand',
'snippet = serverauditor_sshconfig.cloud.commands:SnippetCommand',
'snippets = serverauditor_sshconfig.cloud.commands:SnippetsCommand',
'host = serverauditor_sshconfig.cloud.commands:HostCommand',
'hosts = serverauditor_sshconfig.cloud.commands:HostsCommand',
'identity = serverauditor_sshconfig.cloud.commands:SshIdentityCommand',
'identities = serverauditor_sshconfig.cloud.commands:SshIdentitiesCommand',
'group = serverauditor_sshconfig.cloud.commands:GroupCommand',
'groups = serverauditor_sshconfig.cloud.commands:GroupsCommand',
'pfrule = serverauditor_sshconfig.cloud.commands:PFRuleCommand',
'pfrules = serverauditor_sshconfig.cloud.commands:PFRulesCommand',
'tags = serverauditor_sshconfig.cloud.commands:TagsCommand',
'login = serverauditor_sshconfig.account.commands:LoginCommand',
'logout = serverauditor_sshconfig.account.commands:LogoutCommand',
'push = serverauditor_sshconfig.cloud.commands:PushCommand',
'pull = serverauditor_sshconfig.cloud.commands:PullCommand',
'info = serverauditor_sshconfig.cloud.commands:InfoCommand',
'connect = serverauditor_sshconfig.handlers:ConnectCommand',
]

setup(
name='serverauditor-sshconfig',
version=get_version(),
license='BSD',
author='Crystalnix',
author_email='[email protected]',
url='https://github.com/Crystalnix/serverauditor-sshconfig',
description='Serverauditor ssh-config utility.',
keywords=['serverauditor', 'crystalnix'],
packages=find_packages(),
install_requires=requires,
test_suite='nose.collector',
zip_safe=False,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Topic :: Utilities',
],
entry_points={
'console_scripts': [
'serverauditor = serverauditor_sshconfig.main:main'
],
'serverauditor.handlers': handlers,
'serverauditor.sync.services': [
# WARNING! It should be removed in production!
# Other projects should add such endpoint to add services.
'aws = serverauditor_sshconfig.sync.services.aws:AWSService',
],
},
)


@task
@needs('generate_setup', 'minilib', 'setuptools.command.sdist')
def sdist():
"""Overrides sdist to make sure that our setup.py is generated."""
pass


@task
def lint():
sh('prospector')


@task
def bats():
sh('bats tests/integration')
Binary file added paver-minilib.zip
Binary file not shown.
90 changes: 10 additions & 80 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,80 +1,10 @@
from setuptools import setup, find_packages

from serverauditor_sshconfig import __version__


def get_version():
return '.'.join(map(str, __version__))


def get_long_description():
with open('README.rst') as f:
return f.read()

requires = [
'cliff==1.13',
'stevedore==1.6.0',
'requests==2.7.0',
'pycrypto==2.6',
'six==1.9.0',
'pyopenssl',
'ndg-httpsclient',
'pyasn1',
]


setup(
name='serverauditor-sshconfig',
version=get_version(),
license='BSD',
author='Yan Kalchevskiy',
author_email='[email protected]',
url='https://github.com/Crystalnix/serverauditor-sshconfig',
description='Serverauditor ssh-config utility.',
long_description=get_long_description(),
keywords=['serverauditor', 'crystalnix'],
packages=find_packages(),
install_requires=requires,
zip_safe=False,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Topic :: Utilities',
],
entry_points={
'console_scripts': [
'serverauditor = serverauditor_sshconfig.main:main'
],
'serverauditor.handlers': [
'sync = serverauditor_sshconfig.sync.commands:SyncCommand',
'snippet = serverauditor_sshconfig.cloud.commands:SnippetCommand',
'snippets = serverauditor_sshconfig.cloud.commands:SnippetsCommand',
'host = serverauditor_sshconfig.cloud.commands:HostCommand',
'hosts = serverauditor_sshconfig.cloud.commands:HostsCommand',
'identity = serverauditor_sshconfig.cloud.commands:SshIdentityCommand',
'identities = serverauditor_sshconfig.cloud.commands:SshIdentitiesCommand',
'group = serverauditor_sshconfig.cloud.commands:GroupCommand',
'groups = serverauditor_sshconfig.cloud.commands:GroupsCommand',
'pfrule = serverauditor_sshconfig.cloud.commands:PFRuleCommand',
'pfrules = serverauditor_sshconfig.cloud.commands:PFRulesCommand',
'tags = serverauditor_sshconfig.cloud.commands:TagsCommand',
'login = serverauditor_sshconfig.account.commands:LoginCommand',
'logout = serverauditor_sshconfig.account.commands:LogoutCommand',
'push = serverauditor_sshconfig.cloud.commands:PushCommand',
'pull = serverauditor_sshconfig.cloud.commands:PullCommand',
'info = serverauditor_sshconfig.cloud.commands:InfoCommand',
'connect = serverauditor_sshconfig.handlers:ConnectCommand',
],
'serverauditor.sync.services': [
# WARNING! It should be removed in production!
# Other projects should add such endpoint to add services.
'aws = serverauditor_sshconfig.sync.services.aws:AWSService',
],
},
)
try:
import paver.tasks
except ImportError:
from os.path import exists
if exists("paver-minilib.zip"):
import sys
sys.path.insert(0, "paver-minilib.zip")
import paver.tasks

paver.tasks.main()
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ deps =
prospector
commands =
pip install -U .
nosetests -c .noserc
prospector
paver nosetests
paver lint
paver bats

[flake8]
exclude = .git*
Expand Down

0 comments on commit 332ad89

Please sign in to comment.