Skip to content

Commit cab5366

Browse files
author
Искандаров Эдуард
committed
add setup script and manifest
1 parent 0b4e9df commit cab5366

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

Diff for: MANIFEST.in

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include LICENSE
2+
include README.md

Diff for: setup.py

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- coding: utf-8 -*-
2+
import codecs
3+
import os
4+
import re
5+
from setuptools import setup, find_packages
6+
7+
8+
def read(*parts):
9+
filename = os.path.join(os.path.dirname(__file__), *parts)
10+
with codecs.open(filename, encoding='utf-8') as fp:
11+
return fp.read()
12+
13+
14+
def find_version(*file_paths):
15+
version_file = read(*file_paths)
16+
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
17+
version_file, re.M)
18+
if version_match:
19+
return version_match.group(1)
20+
raise RuntimeError("Unable to find version string.")
21+
22+
23+
install_requires = []
24+
25+
setup(
26+
name = 'yarn-api-client',
27+
version = find_version('yarn_api_client', '__init__.py'),
28+
description='Python client for Hadoop® YARN API',
29+
long_description=read('README.md'),
30+
packages = find_packages(exclude=['tests']),
31+
32+
install_requires = install_requires,
33+
entry_points = {
34+
'console_scripts': [
35+
'yarn_client = yarn_api_client',
36+
],
37+
},
38+
39+
tests_require = ['mock'],
40+
test_suite = 'tests',
41+
42+
author = 'Iskandarov Eduard',
43+
author_email = '[email protected]',
44+
license = 'Mail.Ru Group',
45+
url = 'https://github.com/toidi/hadoop-yarn-api-python-client',
46+
)

Diff for: yarn_api_client/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# -*- coding: utf-8 -*-
2+
__version__ = '0.1.0'

0 commit comments

Comments
 (0)