Skip to content

Commit 03479dd

Browse files
authored
Merge pull request #49 from jha929/feature/refactor-setup-py
setup.py 코드 업데이트
2 parents 0fb8a5b + 91ae4b3 commit 03479dd

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

setup.py

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
11
# -*- coding: utf-8 -*-
2+
3+
import io
4+
import os
5+
26
from setuptools import setup, find_packages
3-
import codecs
4-
install_requires = ['requests']
57

68

7-
def readme():
8-
with codecs.open('README.rst', encoding='utf-8') as f:
9-
return f.read()
9+
def get_spec(filename):
10+
def wrapper():
11+
here = os.path.dirname(__file__)
12+
result = {}
13+
with io.open(os.path.join(here, filename), encoding='utf-8') as src_file:
14+
result = src_file.read()
15+
return result
16+
return wrapper
1017

1118

19+
get_readme = get_spec('README.rst')
20+
get_requirements = get_spec('requirements.txt')
1221
setup(
1322
name='iamport-rest-client',
1423
version='0.8.2',
24+
description="REST client for I'mport;(http://www.iamport.kr)",
25+
long_description=get_readme(),
26+
url='https://github.com/iamport/iamport-rest-client-python',
1527
packages=find_packages(),
16-
include_package_data=True,
17-
install_requires=install_requires,
18-
setup_requires=['pytest-runner'],
1928
author='PerhapsSPY',
2029
author_email='[email protected]',
21-
url='https://github.com/iamport/iamport-rest-client-python',
22-
description="REST client for I'mport;(http://www.iamport.kr)",
23-
long_description=readme(),
30+
include_package_data=True,
31+
install_requires=get_requirements(),
2432
license='MIT',
2533
zip_safe=False,
2634
data_files=[
2735
(
2836
'shared/typehints/python2.7',
2937
['iamport/client.pyi'],
3038
),
31-
(
32-
'shared/typehints/python3.5',
33-
['iamport/client.pyi'],
34-
),
3539
(
3640
'shared/typehints/python3.6',
3741
['iamport/client.pyi'],
@@ -44,6 +48,10 @@ def readme():
4448
'shared/typehints/python3.8',
4549
['iamport/client.pyi'],
4650
),
51+
(
52+
'shared/typehints/python3.9',
53+
['iamport/client.pyi'],
54+
),
4755
],
4856
classifiers=[
4957
'Development Status :: 2 - Pre-Alpha',
@@ -52,13 +60,11 @@ def readme():
5260
'License :: OSI Approved :: MIT License',
5361
'Operating System :: OS Independent',
5462
'Programming Language :: Python',
55-
'Programming Language :: Python :: 2',
5663
'Programming Language :: Python :: 2.7',
57-
'Programming Language :: Python :: 3',
58-
'Programming Language :: Python :: 3.5',
5964
'Programming Language :: Python :: 3.6',
6065
'Programming Language :: Python :: 3.7',
6166
'Programming Language :: Python :: 3.8',
67+
'Programming Language :: Python :: 3.9',
6268
'Programming Language :: Python :: Implementation :: CPython',
6369
'Programming Language :: Python :: Implementation :: PyPy',
6470
'Topic :: Software Development :: Libraries :: Python Modules',

0 commit comments

Comments
 (0)