2016-08-25 07:26:11 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# coding: utf-8
|
|
|
|
|
|
|
|
# Copyright (c) IPython Development Team.
|
|
|
|
# Distributed under the terms of the Modified BSD License.
|
|
|
|
|
|
|
|
from __future__ import print_function
|
|
|
|
|
|
|
|
# the name of the package
|
|
|
|
name = 'yap_kernel'
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Minimal Python version sanity check
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
2016-07-31 16:09:21 +01:00
|
|
|
import sys
|
2016-08-25 07:26:11 +01:00
|
|
|
|
|
|
|
v = sys.version_info
|
|
|
|
if v[:2] < (2,7) or (v[0] >= 3 and v[:2] < (3,3)):
|
|
|
|
error = "ERROR: %s requires Python version 2.7 or 3.3 or above." % name
|
|
|
|
print(error, file=sys.stderr)
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
PY3 = (sys.version_info[0] >= 3)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# get on with it
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
2016-07-31 16:09:21 +01:00
|
|
|
import os
|
2016-08-25 07:26:11 +01:00
|
|
|
from glob import glob
|
|
|
|
|
|
|
|
from distutils.core import setup
|
|
|
|
|
|
|
|
packages = ["${CMAKE_CURRENT_SOURCE_DIR}"]
|
2016-07-31 16:09:21 +01:00
|
|
|
|
2016-08-25 07:26:11 +01:00
|
|
|
version_ns = {}
|
|
|
|
setup_args = dict(
|
|
|
|
name = 'yap_kernel',
|
|
|
|
version = '0.0.1',
|
|
|
|
packages = ["yap_kernel"],
|
|
|
|
package_dir = {'': '${CMAKE_SOURCE_DIR}/packages/python' },
|
|
|
|
description = "YAP Kernel for Jupyter",
|
|
|
|
long_description="A simple YAP kernel for Jupyter/IPython",
|
|
|
|
url="https://github.com/vscosta/yap-6.3",
|
|
|
|
author='Vitor Santos Costa, based on the the IPython',
|
|
|
|
author_email='vsc@dcc.fc.up.pt',
|
|
|
|
license = 'BSD',
|
|
|
|
platforms = "Linux, Mac OS X, Windows",
|
|
|
|
keywords = ['Interactive', 'Interpreter', 'Shell', 'Web'],
|
2016-09-27 18:28:54 +01:00
|
|
|
data_files=[('share/Yap/js', ['${CMAKE_SOURCE_DIR}/misc/editors/prolog.js'])],
|
2016-08-25 07:26:11 +01:00
|
|
|
classifiers = [
|
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'Intended Audience :: System Administrators',
|
|
|
|
'Intended Audience :: Science/Research',
|
|
|
|
'License :: OSI Approved :: BSD License',
|
|
|
|
'Programming Language :: Prolog',
|
|
|
|
'Programming Language :: Python :: 2.7',
|
|
|
|
'Programming Language :: Python :: 3',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
if 'develop' in sys.argv or any(a.startswith('bdist') for a in sys.argv):
|
|
|
|
import setuptools
|
2016-07-31 16:09:21 +01:00
|
|
|
|
2016-08-25 07:26:11 +01:00
|
|
|
setuptools_args = {}
|
|
|
|
install_requires = setuptools_args['install_requires'] = [
|
|
|
|
'ipython>=4.0.0',
|
|
|
|
'traitlets>=4.1.0',
|
|
|
|
'jupyter_client',
|
|
|
|
'tornado>=4.0',
|
|
|
|
]
|
|
|
|
|
|
|
|
extras_require = setuptools_args['extras_require'] = {
|
|
|
|
'test:python_version=="2.7"': ['mock', 'nose_warnings_filters'],
|
2016-07-31 16:09:21 +01:00
|
|
|
}
|
|
|
|
|
2016-08-25 07:26:11 +01:00
|
|
|
if 'setuptools' in sys.modules:
|
|
|
|
setup_args.update(setuptools_args)
|
2016-08-07 15:46:43 +01:00
|
|
|
|
2016-08-25 07:26:11 +01:00
|
|
|
if __name__ == '__main__':
|
|
|
|
setup(**setup_args)
|