From f95cea26617b2670ac458a9521a9b31dd9eec3ce Mon Sep 17 00:00:00 2001 From: Akbar Gumbira Date: Mon, 15 Jul 2019 19:03:28 +0700 Subject: [PATCH] Add setup.py and release script. --- python/release.sh | 12 ++++++++++++ python/setup.py | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100755 python/release.sh create mode 100644 python/setup.py diff --git a/python/release.sh b/python/release.sh new file mode 100755 index 00000000..da4496fd --- /dev/null +++ b/python/release.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +python setup.py sdist + +if [ $1 == "test" ]; + then + echo TEST RELEASE; + twine upload --repository-url https://test.pypi.org/legacy/ dist/* +else + echo PROD RELEASE; + twine upload dist/*.tar.gz +fi diff --git a/python/setup.py b/python/setup.py new file mode 100644 index 00000000..b967065f --- /dev/null +++ b/python/setup.py @@ -0,0 +1,34 @@ +# coding=utf-8 +"""Setup file for distutils / pypi.""" +try: + from ez_setup import use_setuptools + use_setuptools() +except ImportError: + pass + +from setuptools import setup + + +setup( + name='libsvm', + version='3.23', + author='Chih-Chung Chang and Chih-Jen Lin', + py_modules=['svm', 'svmutil', 'commonutil'], + url='https://www.csie.ntu.edu.tw/~cjlin/libsvm/', + description=('Python binding for libsvm (' + 'https://www.csie.ntu.edu.tw/~cjlin/libsvm/).'), + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'Intended Audience :: Science/Research', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Topic :: Scientific/Engineering', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + + ] +)