Skip to content

Commit

Permalink
Merge pull request #68 from kakao/feature/59
Browse files Browse the repository at this point in the history
f-strings로 인해 python 3.6 버전 이하에서 오류가 나는 부분 수정 #59
  • Loading branch information
hubert-lee authored Jun 5, 2019
2 parents 61bea08 + 4abd399 commit cbfe6d4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main/python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ class CustomBuild(build):
"""
run build command
"""
with zipfile.ZipFile(f'{_SRC_NAME}.zip', 'r') as src_zip:
with zipfile.ZipFile('{}.zip'.format(_SRC_NAME), 'r') as src_zip:
src_zip.extractall()
build_dir = f'{_SRC_NAME}/build'
build_dir = '{}/build'.format(_SRC_NAME)
os.makedirs(build_dir, exist_ok=True)
subprocess.check_call('cmake ..', cwd=build_dir, shell=True)
subprocess.check_call('make all resource', cwd=build_dir, shell=True)
shutil.rmtree('khaiii/lib', ignore_errors=True)
shutil.copytree(f'{build_dir}/lib', 'khaiii/lib')
shutil.copytree('{}/lib'.format(build_dir), 'khaiii/lib')
shutil.rmtree('khaiii/share', ignore_errors=True)
shutil.copytree(f'{build_dir}/share', 'khaiii/share')
shutil.copytree('{}/share'.format(build_dir), 'khaiii/share')
shutil.rmtree(_SRC_NAME)
build.run(self)

Expand Down Expand Up @@ -83,13 +83,12 @@ setup(
'Development Status :: 5 - Stable',
'License :: OSI Approved :: Apache 2.0',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
],
license='Apache 2.0',
packages=['khaiii', ],
include_package_data=True,
install_requires=[],
setup_requires=['cmake>=3.10', 'pytest-runner'],
setup_requires=['pytest-runner', ],
tests_require=['pytest', ],
zip_safe=False,
cmdclass={'build': CustomBuild}
Expand Down

0 comments on commit cbfe6d4

Please sign in to comment.