Skip to content

Commit b37df3c

Browse files
authored
Merge pull request #19 from Yancey1989/setup_egg
Package Fluid distribution achieve
2 parents ecc463f + dad284b commit b37df3c

7 files changed

Lines changed: 90 additions & 3 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
*~
22
__pycache__
3+
.eggs
4+
build
5+
dist
6+
fluid.egg-info

fluid/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from fluid.pyfunc import *
File renamed without changes.

fluid.py renamed to fluid/pyfunc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
import yaml
1212

13-
import tekton
14-
import k8s
13+
import fluid.tekton as tekton
14+
import fluid.k8s as k8s
1515

1616

1717
def dump_yaml(content):

tekton.py renamed to fluid/tekton.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
'''
66

77
import inspect
8-
import k8s
8+
import fluid.k8s as k8s
99

1010

1111
def task(func):

fluid/version.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
3+
VERSION = (0, 0, 1, 'dev')
4+
5+
__version__ = '.'.join(map(str, VERSION))

setup.py

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import io
4+
import os
5+
6+
from setuptools import find_packages, setup
7+
8+
# Package meta-data.
9+
NAME = 'fluid'
10+
DESCRIPTION = 'Tekton Workflow compiler.'
11+
URL = 'https://github.com/wangkuiyi/fluid'
12+
EMAIL = 'sqlflow@list.alibaba-inc.com'
13+
AUTHOR = 'SQLFlow Dev'
14+
REQUIRES_PYTHON = '>=3.5.0'
15+
VERSION = None
16+
17+
# What packages are required for this module to be executed?
18+
SETUP_REQUIRED = ['pytest-runner']
19+
TEST_REQUIRED = [
20+
'pytest',
21+
]
22+
23+
# What packages are optional?
24+
EXTRAS = {}
25+
26+
# The rest you shouldn't have to touch too much :)
27+
# ------------------------------------------------
28+
# Except, perhaps the License and Trove Classifiers!
29+
# If you do change the License, remember to change the Trove Classifier for that!
30+
31+
here = os.path.abspath(os.path.dirname(__file__))
32+
33+
# Import the README and use it as the long-description.
34+
# Note: this will only work if 'README.md' is present in your MANIFEST.in file!
35+
try:
36+
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
37+
long_description = '\n' + f.read()
38+
except FileNotFoundError:
39+
long_description = DESCRIPTION
40+
41+
# Load the package's version.py module as a dictionary.
42+
about = {}
43+
if not VERSION:
44+
with open(os.path.join(here, NAME, 'version.py')) as f:
45+
exec(f.read(), about)
46+
else:
47+
about['__version__'] = VERSION
48+
49+
# Where the magic happens:
50+
setup(
51+
name=NAME,
52+
version=about['__version__'],
53+
description=DESCRIPTION,
54+
long_description=long_description,
55+
long_description_content_type='text/markdown',
56+
author=AUTHOR,
57+
author_email=EMAIL,
58+
python_requires=REQUIRES_PYTHON,
59+
url=URL,
60+
packages=find_packages(exclude=('tests', )),
61+
setup_requires=SETUP_REQUIRED,
62+
tests_require=TEST_REQUIRED,
63+
extras_require=EXTRAS,
64+
license='Apache License 2.0',
65+
classifiers=[
66+
# Trove classifiers
67+
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
68+
'License :: OSI Approved :: Apache Software License',
69+
'Programming Language :: Python',
70+
'Programming Language :: Python :: 3 :: Only',
71+
'Programming Language :: Python :: 3.5',
72+
'Programming Language :: Python :: 3.6',
73+
'Programming Language :: Python :: 3.7',
74+
'Programming Language :: Python :: Implementation :: CPython',
75+
'Programming Language :: Python :: Implementation :: PyPy'
76+
],
77+
)

0 commit comments

Comments
 (0)