Skip to content

Commit

Permalink
Got packaging working
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyattablet committed Dec 21, 2018
1 parent f1b015a commit 2856907
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 33 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,8 @@ venv.bak/
.mypy_cache/

# jetbrains IDE settings
.idea/
.idea/

# setuptools stuff
AUTHORS
ChangeLog
9 changes: 4 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include requirements.txt
include requirements_dev.txt
include README.md
include README.rst
recursive-include tokenex *
include requirements.txt README.md
recursive-include tokenex *.py
global-exclude *.pyc __pycache__
prune tokenex/tests
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ vcrpy
pycrypto
coveralls
tox-travis
pbr
19 changes: 19 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[metadata]
name = python-tokenex
license = MIT License
description = Python Module and CLI for interacting with TokenEx services
author = Tablet, Inc
author-email = ops@tablethotels.com
home-page = https://github.com/tablethotels/python-tokenex
classifiers =
Intended Audience :: Developers
Natural Language :: English
Programming Language :: Python
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7

[wheel]
universal = 1
26 changes: 4 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
from setuptools import setup, find_packages
from io import open
from tokenex import __version__


with open(os.path.join(os.path.dirname(__file__), 'requirements.txt')) as f:
Expand All @@ -13,32 +12,15 @@
test_required.pop(0)

setup(
name='python-tokenex',
version=__version__,
packages=find_packages(),
entry_points={
'console_scripts': [
'tokenex = tokenex.cli.__main__:main'
'tokenex = tokenex.cli:handle'
]
},
setup_requires=['pbr>=1.9', 'setuptools>=17.1'],
pbr=True,
install_requires=required,
tests_require=test_required,
include_package_data=True,
license='MIT License',
description='Tablet Base Configuration module',
author='Tablet, Inc',
author_email='ops@tablethotels.com',
classifiers=[
'Environment :: Console',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
include_package_data=True
)
2 changes: 0 additions & 2 deletions tokenex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@
err_msg = 'This version of Python ({}.{}) is not supported!\n'.format(python_major_version, python_minor_version) +\
'The following versions of Python are supported: {}'.format(formatted_supported_versions)
raise RuntimeError(err_msg)

__version__ = '0.0.1'
8 changes: 6 additions & 2 deletions tokenex/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ def main(args):
print("\n** An unexpected error has occurred **\n") # pragma: no cover


if __name__ == "__main__":

def handle(): # pragma: no cover
args = parse_args()
errors = validate_args(args)

Expand All @@ -163,3 +162,8 @@ def main(args):
print("The following validation errors occurred:")
for validation_error in errors:
print(" - " + validation_error)


if __name__ == "__main__":

handle()
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ deps = coverage
commands =
coverage combine
coverage report -m
coveralls

0 comments on commit 2856907

Please sign in to comment.