2017-09-25 20:17:43 +03:00
|
|
|
#!/usr/bin/env python3
|
2017-09-15 03:22:43 +03:00
|
|
|
# Copyright (c) 2017-present, Facebook, Inc.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This source code is licensed under the license found in the LICENSE file in
|
|
|
|
# the root directory of this source tree. An additional grant of patent rights
|
|
|
|
# can be found in the PATENTS file in the same directory.
|
|
|
|
|
|
|
|
from setuptools import setup, find_packages, Extension
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
if sys.version_info < (3,):
|
|
|
|
sys.exit('Sorry, Python3 is required for fairseq.')
|
|
|
|
|
|
|
|
with open('README.md') as f:
|
|
|
|
readme = f.read()
|
|
|
|
|
|
|
|
with open('LICENSE') as f:
|
|
|
|
license = f.read()
|
|
|
|
|
|
|
|
with open('requirements.txt') as f:
|
|
|
|
reqs = f.read()
|
|
|
|
|
2018-03-02 07:09:54 +03:00
|
|
|
|
2017-09-15 03:22:43 +03:00
|
|
|
bleu = Extension(
|
|
|
|
'fairseq.libbleu',
|
|
|
|
sources=[
|
|
|
|
'fairseq/clib/libbleu/libbleu.cpp',
|
|
|
|
'fairseq/clib/libbleu/module.cpp',
|
|
|
|
],
|
|
|
|
extra_compile_args=['-std=c++11'],
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
setup(
|
|
|
|
name='fairseq',
|
2018-09-06 21:46:54 +03:00
|
|
|
version='0.6.0',
|
2017-09-15 03:22:43 +03:00
|
|
|
description='Facebook AI Research Sequence-to-Sequence Toolkit',
|
|
|
|
long_description=readme,
|
|
|
|
license=license,
|
|
|
|
install_requires=reqs.strip().split('\n'),
|
|
|
|
packages=find_packages(),
|
|
|
|
ext_modules=[bleu],
|
2018-02-28 01:09:42 +03:00
|
|
|
test_suite='tests',
|
2017-09-15 03:22:43 +03:00
|
|
|
)
|