diff --git a/.gitignore b/.gitignore index 9b5e2e8..73a0e0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ *~ __pycache__ +.eggs +build +dist +fluid.egg-info diff --git a/fluid/__init__.py b/fluid/__init__.py new file mode 100644 index 0000000..bb9d5cb --- /dev/null +++ b/fluid/__init__.py @@ -0,0 +1 @@ +from fluid.pyfunc import * \ No newline at end of file diff --git a/k8s.py b/fluid/k8s.py similarity index 100% rename from k8s.py rename to fluid/k8s.py diff --git a/fluid.py b/fluid/pyfunc.py similarity index 98% rename from fluid.py rename to fluid/pyfunc.py index 5f64226..a58f0da 100644 --- a/fluid.py +++ b/fluid/pyfunc.py @@ -10,8 +10,8 @@ import yaml -import tekton -import k8s +import fluid.tekton as tekton +import fluid.k8s as k8s def dump_yaml(content): diff --git a/tekton.py b/fluid/tekton.py similarity index 99% rename from tekton.py rename to fluid/tekton.py index 4844446..66aff86 100644 --- a/tekton.py +++ b/fluid/tekton.py @@ -5,7 +5,7 @@ ''' import inspect -import k8s +import fluid.k8s as k8s def task(func): diff --git a/fluid/version.py b/fluid/version.py new file mode 100644 index 0000000..fc2dc57 --- /dev/null +++ b/fluid/version.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- + +VERSION = (0, 0, 1, 'dev') + +__version__ = '.'.join(map(str, VERSION)) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..90f44c7 --- /dev/null +++ b/setup.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- + +import io +import os + +from setuptools import find_packages, setup + +# Package meta-data. +NAME = 'fluid' +DESCRIPTION = 'Tekton Workflow compiler.' +URL = 'https://github.com/wangkuiyi/fluid' +EMAIL = 'sqlflow@list.alibaba-inc.com' +AUTHOR = 'SQLFlow Dev' +REQUIRES_PYTHON = '>=3.5.0' +VERSION = None + +# What packages are required for this module to be executed? +SETUP_REQUIRED = ['pytest-runner'] +TEST_REQUIRED = [ + 'pytest', +] + +# What packages are optional? +EXTRAS = {} + +# The rest you shouldn't have to touch too much :) +# ------------------------------------------------ +# Except, perhaps the License and Trove Classifiers! +# If you do change the License, remember to change the Trove Classifier for that! + +here = os.path.abspath(os.path.dirname(__file__)) + +# Import the README and use it as the long-description. +# Note: this will only work if 'README.md' is present in your MANIFEST.in file! +try: + with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: + long_description = '\n' + f.read() +except FileNotFoundError: + long_description = DESCRIPTION + +# Load the package's version.py module as a dictionary. +about = {} +if not VERSION: + with open(os.path.join(here, NAME, 'version.py')) as f: + exec(f.read(), about) +else: + about['__version__'] = VERSION + +# Where the magic happens: +setup( + name=NAME, + version=about['__version__'], + description=DESCRIPTION, + long_description=long_description, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=EMAIL, + python_requires=REQUIRES_PYTHON, + url=URL, + packages=find_packages(exclude=('tests', )), + setup_requires=SETUP_REQUIRED, + tests_require=TEST_REQUIRED, + extras_require=EXTRAS, + license='Apache License 2.0', + classifiers=[ + # Trove classifiers + # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3 :: Only', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy' + ], +)