From fbd7e8af950569d38814621a17c880b98dba45f7 Mon Sep 17 00:00:00 2001 From: Sunghyun Hwang Date: Sun, 9 Sep 2018 16:05:48 +0900 Subject: [PATCH] Get ready for release :tada: Signed-off-by: Sunghyun Hwang --- .gitignore | 2 ++ .travis.yml | 9 +++++++++ kformat/__init__.py | 2 ++ kformat/kclass.py | 8 +++++++- setup.py | 25 +++++++++++++++++++++++++ 5 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index eb08e78..bb422c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ env/ *.pyc .idea/ +*.egg-info +build/ diff --git a/.travis.yml b/.travis.yml index 47d5665..28a18ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,3 +4,12 @@ python: script: - python3 -m unittest + +deploy: + provider: pypi + user: $PYPI_USERNAME + password: $PYPI_PASSWORD + on: + tags: true + branch: master + python: '3.7-dev' diff --git a/kformat/__init__.py b/kformat/__init__.py index 86243d0..674bf92 100644 --- a/kformat/__init__.py +++ b/kformat/__init__.py @@ -3,3 +3,5 @@ __all__ = ['kclass', 'N', 'AN'] + +__version__ = '0.1.0' diff --git a/kformat/kclass.py b/kformat/kclass.py index 1fa1e1c..3ab4170 100644 --- a/kformat/kclass.py +++ b/kformat/kclass.py @@ -26,4 +26,10 @@ def init(self, *args): def kclass(_cls=None): - return _kclass(_cls) + def wrap(cls): + return _kclass(cls) + + if _cls is None: + return wrap + + return wrap(_cls) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..b64eea4 --- /dev/null +++ b/setup.py @@ -0,0 +1,25 @@ +import setuptools + +import kformat + + +setuptools.setup( + name='K-Format', + version=kformat.__version__, + description='Python Library for dealing with KCB K-Format', + license='MIT', + python_requires='>=3.7', + url='https://github.com/Rainist/K-Format', + author='Sunghyun Hwang', + author_email='me' '@' 'sunghyunzz.com', + maintainer='Rainist', + maintainer_email='engineering' '@' 'rainist.com', + classifiers=[ + 'Development Status :: 3 - Alpha', + 'Operating System :: OS Independent', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.7' + ], + packages=setuptools.find_packages(exclude=['tests*']), + test_suite='tests' +)