diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000000000000000000000000000000000000..728c87ea588c7177da645df21a168fcd0849a381 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,5 @@ +include LICENSE +snclude README.md +recursive-include doc * +recursive-include examples * +recursive-include surprise *.c *.cpp *.pyx diff --git a/README.md b/README.md index 6fce682cdc178dd58ca083393dcf03cce24ab766..7bbb0ae0c01977efb830f2f18d4d2b7e7ac19e1b 100644 --- a/README.md +++ b/README.md @@ -90,4 +90,4 @@ Then, run the appropriate Cornac install command according to your platform. ## License -[Apache License 2.0](LICENSE.md) +[Apache License 2.0](LICENSE) diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..b88034e414bc7b80d686e3c94d516305348053ea --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description-file = README.md diff --git a/setup.py b/setup.py index 4747b711dfe33408dbfc8d94942e7133802c1123..0500037d0cbea6f32022604c817505f8ffe40849 100644 --- a/setup.py +++ b/setup.py @@ -1,71 +1,89 @@ - import setuptools import os - try: from Cython.Build import cythonize except ImportError: use_cython = False else: - use_cython = True - - -with open("README.md", "r") as fh: + use_cython = True + +with open('README.md', 'r') as fh: long_description = fh.read() - - -#cython c++ modules + +# cython c++ modules external_modules = [] if use_cython: - ext_c2pf = setuptools.Extension("c2pf", - sources=["./cornac/models/c2pf/cython/c2pf.pyx", "./cornac/models/c2pf/cpp/cpp_c2pf.cpp"], - libraries=[], - include_dirs=['./cornac/models/c2pf/cpp/','./cornac/utils/external/eigen/Eigen','./cornac/utils/external/eigen/unsupported/Eigen/'], - language="c++" ) - external_modules += cythonize(ext_c2pf) - # - ext_pmf = './cornac/models/pmf/cython/pmf.pyx' - external_modules += cythonize(ext_pmf) - - - + ext_c2pf = setuptools.Extension('c2pf', + sources=[ + 'cornac/models/c2pf/cython/c2pf.pyx', + 'cornac/models/c2pf/cpp/cpp_c2pf.cpp'], + libraries=[], + include_dirs=[ + 'cornac/models/c2pf/cpp/', + 'cornac/utils/external/eigen/Eigen', + 'cornac/utils/external/eigen/unsupported/Eigen/' + ], + language='c++') + external_modules += cythonize(ext_c2pf) + # + ext_pmf = 'cornac/models/pmf/cython/pmf.pyx' + external_modules += cythonize(ext_pmf) else: ext_c2pf = [setuptools.Extension('c2pf', - sources=['./cornac/models/c2pf/cython/c2pf.cpp', "./cornac/models/c2pf/cpp/cpp_c2pf.cpp"], - language='c++', - include_dirs=['./cornac/models/c2pf/cpp/','./cornac/utils/external/eigen/Eigen','./cornac/utils/external/eigen/unsupported/Eigen/'])] + sources=[ + 'cornac/models/c2pf/cython/c2pf.cpp', + 'cornac/models/c2pf/cpp/cpp_c2pf.cpp' + ], + language='c++', + include_dirs=[ + 'cornac/models/c2pf/cpp/', + 'cornac/utils/external/eigen/Eigen', + 'cornac/utils/external/eigen/unsupported/Eigen/' + ])] external_modules += ext_c2pf # ext_pmf = [setuptools.Extension('pmf', - ['./cornac/models/pmf/cython/pmf.c'])] + ['cornac/models/pmf/cython/pmf.c'])] external_modules += ext_pmf - - -#Handling PyTorch dependency + +# Handling PyTorch dependency if os.name == 'nt': - torch_dl = 'http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl' + torch_dl = 'http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl' elif os.name == 'posix': - torch_dl = 'http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl' - - + torch_dl = 'http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl' + setuptools.setup( - name="cornac", - version="0.1.0", - author="Aghiles Salah", - author_email="asalah@smu.edu.sg", - description="A collection of recommendation algorithms and comparisons", + name='cornac', + version='0.1.0.post1', + author='Aghiles Salah', + author_email='asalah@smu.edu.sg', + description='A collection of recommendation algorithms and comparisons', long_description=long_description, - long_description_content_type="text/markdown", - url="", + long_description_content_type='text/markdown', + url='https://cornac.preferred.ai/', + download_url='https://github.com/PreferredAI/cornac/archive/v0.1.0.tar.gz', + keywords=['recommender', 'recommendation', 'factorization', 'multimodal'], zip_safe=False, - ext_modules = external_modules, - install_requires=['numpy', 'scipy', 'pandas','tensorflow>=1.2.1','torch>=0.4.0'], - dependency_links = [torch_dl], + ext_modules=external_modules, + install_requires=[ + 'numpy', + 'scipy', + 'pandas', + 'tensorflow>=1.2.1', + 'torch>=0.4.0' + ], + dependency_links=[torch_dl], packages=setuptools.find_packages(), classifiers=( - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", + 'Development Status :: 3 - Alpha', + 'Intended Audience :: Science/Research', + 'Intended Audience :: Education', + 'Intended Audience :: Developers', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: Apache Software License', + 'Topic :: Software Development', + 'Topic :: Scientific/Engineering', ), -) \ No newline at end of file +)