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()
|
|
|
|
|
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',
|
2019-06-20 16:23:49 +03:00
|
|
|
version='0.7.1',
|
2017-09-15 03:22:43 +03:00
|
|
|
description='Facebook AI Research Sequence-to-Sequence Toolkit',
|
2019-02-09 09:00:46 +03:00
|
|
|
url='https://github.com/pytorch/fairseq',
|
|
|
|
classifiers=[
|
|
|
|
'Intended Audience :: Science/Research',
|
|
|
|
'License :: OSI Approved :: BSD License',
|
2019-06-11 14:06:52 +03:00
|
|
|
'Programming Language :: Python :: 3.5',
|
2019-02-09 09:00:46 +03:00
|
|
|
'Programming Language :: Python :: 3.6',
|
|
|
|
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
|
|
|
],
|
2017-09-15 03:22:43 +03:00
|
|
|
long_description=readme,
|
2019-06-20 16:23:49 +03:00
|
|
|
long_description_content_type='text/markdown',
|
2019-02-09 09:00:46 +03:00
|
|
|
install_requires=[
|
|
|
|
'cffi',
|
|
|
|
'numpy',
|
2019-02-28 18:51:55 +03:00
|
|
|
'sacrebleu',
|
2019-03-16 07:27:03 +03:00
|
|
|
'torch',
|
2019-02-09 09:00:46 +03:00
|
|
|
'tqdm',
|
|
|
|
],
|
|
|
|
packages=find_packages(exclude=['scripts', 'tests']),
|
2017-09-15 03:22:43 +03:00
|
|
|
ext_modules=[bleu],
|
2018-02-28 01:09:42 +03:00
|
|
|
test_suite='tests',
|
2019-02-05 18:46:44 +03:00
|
|
|
entry_points={
|
|
|
|
'console_scripts': [
|
2019-02-09 09:00:46 +03:00
|
|
|
'fairseq-eval-lm = fairseq_cli.eval_lm:cli_main',
|
|
|
|
'fairseq-generate = fairseq_cli.generate:cli_main',
|
|
|
|
'fairseq-interactive = fairseq_cli.interactive:cli_main',
|
|
|
|
'fairseq-preprocess = fairseq_cli.preprocess:cli_main',
|
|
|
|
'fairseq-train = fairseq_cli.train:cli_main',
|
|
|
|
'fairseq-score = fairseq_cli.score:main',
|
2019-02-05 18:46:44 +03:00
|
|
|
],
|
|
|
|
},
|
2017-09-15 03:22:43 +03:00
|
|
|
)
|