Skip to content
Snippets Groups Projects
Commit e5c89ac6 authored by Quoc-Tuan Truong's avatar Quoc-Tuan Truong
Browse files

Alpha-1 Release

parent 023bb810
No related branches found
No related tags found
No related merge requests found
File moved
include LICENSE
snclude README.md
recursive-include doc *
recursive-include examples *
recursive-include surprise *.c *.cpp *.pyx
...@@ -90,4 +90,4 @@ Then, run the appropriate Cornac install command according to your platform. ...@@ -90,4 +90,4 @@ Then, run the appropriate Cornac install command according to your platform.
## License ## License
[Apache License 2.0](LICENSE.md) [Apache License 2.0](LICENSE)
[metadata]
description-file = README.md
import setuptools import setuptools
import os import os
try: try:
from Cython.Build import cythonize from Cython.Build import cythonize
except ImportError: except ImportError:
use_cython = False use_cython = False
else: else:
use_cython = True use_cython = True
with open('README.md', 'r') as fh:
with open("README.md", "r") as fh:
long_description = fh.read() long_description = fh.read()
# cython c++ modules
#cython c++ modules
external_modules = [] external_modules = []
if use_cython: if use_cython:
ext_c2pf = setuptools.Extension("c2pf", ext_c2pf = setuptools.Extension('c2pf',
sources=["./cornac/models/c2pf/cython/c2pf.pyx", "./cornac/models/c2pf/cpp/cpp_c2pf.cpp"], sources=[
libraries=[], 'cornac/models/c2pf/cython/c2pf.pyx',
include_dirs=['./cornac/models/c2pf/cpp/','./cornac/utils/external/eigen/Eigen','./cornac/utils/external/eigen/unsupported/Eigen/'], 'cornac/models/c2pf/cpp/cpp_c2pf.cpp'],
language="c++" ) libraries=[],
external_modules += cythonize(ext_c2pf) include_dirs=[
# 'cornac/models/c2pf/cpp/',
ext_pmf = './cornac/models/pmf/cython/pmf.pyx' 'cornac/utils/external/eigen/Eigen',
external_modules += cythonize(ext_pmf) '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: else:
ext_c2pf = [setuptools.Extension('c2pf', ext_c2pf = [setuptools.Extension('c2pf',
sources=['./cornac/models/c2pf/cython/c2pf.cpp', "./cornac/models/c2pf/cpp/cpp_c2pf.cpp"], sources=[
language='c++', 'cornac/models/c2pf/cython/c2pf.cpp',
include_dirs=['./cornac/models/c2pf/cpp/','./cornac/utils/external/eigen/Eigen','./cornac/utils/external/eigen/unsupported/Eigen/'])] '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 external_modules += ext_c2pf
# #
ext_pmf = [setuptools.Extension('pmf', ext_pmf = [setuptools.Extension('pmf',
['./cornac/models/pmf/cython/pmf.c'])] ['cornac/models/pmf/cython/pmf.c'])]
external_modules += ext_pmf external_modules += ext_pmf
# Handling PyTorch dependency
#Handling PyTorch dependency
if os.name == 'nt': 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': 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( setuptools.setup(
name="cornac", name='cornac',
version="0.1.0", version='0.1.0.post1',
author="Aghiles Salah", author='Aghiles Salah',
author_email="asalah@smu.edu.sg", author_email='asalah@smu.edu.sg',
description="A collection of recommendation algorithms and comparisons", description='A collection of recommendation algorithms and comparisons',
long_description=long_description, long_description=long_description,
long_description_content_type="text/markdown", long_description_content_type='text/markdown',
url="", 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, zip_safe=False,
ext_modules = external_modules, ext_modules=external_modules,
install_requires=['numpy', 'scipy', 'pandas','tensorflow>=1.2.1','torch>=0.4.0'], install_requires=[
dependency_links = [torch_dl], 'numpy',
'scipy',
'pandas',
'tensorflow>=1.2.1',
'torch>=0.4.0'
],
dependency_links=[torch_dl],
packages=setuptools.find_packages(), packages=setuptools.find_packages(),
classifiers=( classifiers=(
"Programming Language :: Python :: 3", 'Development Status :: 3 - Alpha',
"License :: OSI Approved :: MIT License", 'Intended Audience :: Science/Research',
"Operating System :: OS Independent", '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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment