Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

(QA-2038) Create "setup.py" for Distribution #3

Merged
merged 1 commit into from
Jan 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ import
.ruby-version
*.lock
*.pyc

dist/
build/
MANIFEST
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
20 changes: 20 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env python

#===================================================================================================
# Imports
#===================================================================================================
from distutils.core import setup
from vmpooler_client.version import version

#===================================================================================================
# Main
#===================================================================================================
setup(name='vmpooler-client',
version=version,
description='Manage resources in the vmpooler service from the command-line.',
author='Ryan Gard',
author_email='ryan.gard@puppetlabs.com',
url='https://github.com/puppetlabs/vmpooler-client',
packages=['vmpooler_client', 'vmpooler_client.commands'],
scripts=['vmpooler_client.py']
)
2 changes: 1 addition & 1 deletion tests/unit/service_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#===================================================================================================
# Imports
#===================================================================================================
from lib import service
from vmpooler_client import service
from unittest import main, TestCase, skipIf
from mock import patch

Expand Down
18 changes: 8 additions & 10 deletions vmpooler_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@
.. moduleauthor:: Joe Pinsonault <joe.pinsonault@puppetlabs.com>
"""

__version__ = "2.4.2"

#===================================================================================================
# Imports
#===================================================================================================
import sys
from lib.conf_file import load_config
from lib.command_parser import CommandParser, valid_lifetime
from lib.commands import config, lifetime, token, vm
from vmpooler_client.conf_file import load_config
from vmpooler_client.command_parser import CommandParser, valid_lifetime
from vmpooler_client.commands import config, lifetime, token, vm

#===================================================================================================
# Functions: Private (Subcommands)
Expand All @@ -25,7 +23,7 @@ def _configure_config_subcommands(cmd_parser):
"""Configure the subcommands for the "config" top-level command.

Args:
cmd_parser |lib.command_parser.CommandParser| = The command parser.
cmd_parser |vmpooler_client.command_parser.CommandParser| = The command parser.

Returns:
|None|
Expand Down Expand Up @@ -89,7 +87,7 @@ def _configure_lifetime_subcommands(cmd_parser):
"""Configure the subcommands for the "lifetime" top-level command.

Args:
cmd_parser |lib.command_parser.CommandParser| = The command parser.
cmd_parser |vmpooler_client.command_parser.CommandParser| = The command parser.

Returns:
|None|
Expand Down Expand Up @@ -151,7 +149,7 @@ def _configure_token_subcommands(cmd_parser):
"""Configure the subcommands for the "token" top-level command.

Args:
cmd_parser |lib.command_parser.CommandParser| = The command parser.
cmd_parser |vmpooler_client.command_parser.CommandParser| = The command parser.

Returns:
|None|
Expand Down Expand Up @@ -197,7 +195,7 @@ def _configure_vm_subcommands(cmd_parser):
"""Configure the subcommands for the "vm" top-level command.

Args:
cmd_parser |lib.command_parser.CommandParser| = The command parser.
cmd_parser |vmpooler_client.command_parser.CommandParser| = The command parser.

Returns:
|None|
Expand Down Expand Up @@ -262,7 +260,7 @@ def configure_command_parser(argv):
argv |list| = List of CLI commands and arguments.

Returns:
|lib.command_parser.CommandParser| = A custom command parser.
|vmpooler_client.command_parser.CommandParser| = A custom command parser.

Raises:
|None|
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions vmpooler_client/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = "2.4.3"