update to latest ipykernel
This commit is contained in:
@@ -1,8 +1,24 @@
|
||||
recursive-include yap4py *.dylib
|
||||
recursive-include yap4py *.dll
|
||||
recursive-include yap4py *.so
|
||||
recursive-include yap4py/prolog *.yap
|
||||
recursive-include yap4py *.yss
|
||||
recursive-include yap4py/prolog *.pl
|
||||
recursive-include yap4py/prolog *.r
|
||||
recursive-include yap4py *.md
|
||||
include COPYING.md
|
||||
include CONTRIBUTING.md
|
||||
include README.md
|
||||
|
||||
# Documentation
|
||||
graft docs
|
||||
exclude docs/\#*
|
||||
|
||||
# Examples
|
||||
graft examples
|
||||
|
||||
# docs subdirs we want to skip
|
||||
prune docs/build
|
||||
prune docs/gh-pages
|
||||
prune docs/dist
|
||||
|
||||
# Patterns to exclude from any directory
|
||||
global-exclude *~
|
||||
global-exclude *.pyc
|
||||
global-exclude *.pyo
|
||||
global-exclude .git
|
||||
global-exclude .ipynb_checkpoints
|
||||
|
||||
prune data_kernelspec
|
||||
|
93
packages/python/swig/YAP4PY.md
Normal file
93
packages/python/swig/YAP4PY.md
Normal file
@@ -0,0 +1,93 @@
|
||||
|
||||
<center>
|
||||

|
||||
</center>
|
||||
|
||||
NOTE: this version of YAP is still experimental, documentation may be out of date.
|
||||
|
||||
## Introduction
|
||||
|
||||
This document provides User information on version 6.3.4 of
|
||||
YAP (<em>Yet Another Prolog</em>). The YAP Prolog System is a
|
||||
high-performance Prolog compiler developed at Universidade do
|
||||
Porto. YAP supports stream Input/Output, sockets, modules,
|
||||
exceptions, Prolog debugger, C-interface, dynamic code, internal
|
||||
database, DCGs, saved states, co-routining, arrays, threads.
|
||||
|
||||
We explicitly allow both commercial and non-commercial use of YAP.
|
||||
|
||||
|
||||
YAP is based on the David H. D. Warren's WAM (Warren Abstract Machine),
|
||||
with several optimizations for better performance. YAP follows the
|
||||
Edinburgh tradition, and was originally designed to be largely
|
||||
compatible with DEC-10 Prolog, Quintus Prolog, and especially with
|
||||
C-Prolog. More recently, we have worked on being compatible with SICStus Prolog and with SWI-Prolog.
|
||||
|
||||
YAP implements most of the ISO-Prolog standard. We are striving at
|
||||
full compatibility, and the manual describes what is still
|
||||
missing.
|
||||
The document is intended neither as an introduction to Prolog nor to the
|
||||
implementation aspects of the compiler. A good introduction to
|
||||
programming in Prolog is the book @cite TheArtOfProlog , by
|
||||
L. Sterling and E. Shapiro, published by "The MIT Press, Cambridge
|
||||
MA". Other references should include the classical @cite ProgrammingInProlog , by W.F. Clocksin and C.S. Mellish, published by
|
||||
Springer-Verlag.
|
||||
|
||||
YAP 6.3.4 has been built with the gcc and clang compilers on Linux and OSX machines. We expect to recover support for WIN32 machines and
|
||||
Android next.
|
||||
|
||||
We are happy to include in YAP several excellent packages developed
|
||||
under separate licenses. Our thanks to the authors for their kind
|
||||
authorization to include these packages.
|
||||
|
||||
The overall copyright and permission notice for YAP4.3 can be found in
|
||||
the Artistic file in this directory. YAP follows the Perl Artistic
|
||||
license, and it is thus non-copylefted freeware. Some components of YAP have been obtained from SWI Prolog and ciao, and have
|
||||
different licenses.
|
||||
|
||||
If you have a question about this software, desire to add code, found a
|
||||
bug, want to request a feature, or wonder how to get further assistance,
|
||||
please send e-mail to <yap-users AT lists.sourceforge.net>. To
|
||||
subscribe to the mailing list, visit the page
|
||||
<https://lists.sourceforge.net/lists/listinfo/yap-users>.
|
||||
|
||||
On-line documentation is available for [YAP](http://www.dcc.fp.pt/~vsc/yap/)
|
||||
|
||||
|
||||
|
||||
The packages are, in alphabetical order:
|
||||
|
||||
+ The CHR package developed by Tom Schrijvers,
|
||||
Christian Holzbaur, and Jan Wielemaker.
|
||||
|
||||
+ The CLP(BN) package and Horus toolkit developed by Tiago Gomes, and Vítor Santos Costa.
|
||||
|
||||
+ The CLP(R) package developed by Leslie De Koninck, Bart Demoen, Tom
|
||||
Schrijvers, and Jan Wielemaker, based on the CLP(Q,R) implementation
|
||||
by Christian Holzbaur.
|
||||
|
||||
+ The CPLint package developed by Fabrizio Riguzzi's research
|
||||
laboratory at the [University of Ferrara](http://www.ing.unife.it/Docenti/FabrizioRiguzzi/)
|
||||
|
||||
+ The CUDA interface package developed by Carlos Martínez, Jorge
|
||||
Buenabad, Inês Dutra and Vítor Santos Costa.
|
||||
|
||||
+ The [GECODE](http://www.gecode.org) interface package developed by Denys Duchier and Vítor Santos Costa.
|
||||
|
||||
+ The [JPL](http://www.swi-prolog.org/packages/jpl/) (Java-Prolog Library) package developed by .
|
||||
|
||||
The minisat SAT solver interface developed by Michael Codish,
|
||||
Vitaly Lagoon, and Peter J. Stuckey.
|
||||
|
||||
+ The MYDDAS relational data-base interface developed at the
|
||||
Universidade do Porto by Tiago Soares, Michel Ferreira, and Ricardo Rocha.
|
||||
|
||||
+ The [PRISM](http://rjida.meijo-u.ac.jp/prism/) logic-based
|
||||
programming system for statistical modeling developed at the Sato
|
||||
Research Laboratory, TITECH, Japan.
|
||||
|
||||
+ The ProbLog 1 system developed by the [ProbLog](https://dtai.cs.kuleuven.be/problog) team in the
|
||||
DTAI group of KULeuven.
|
||||
|
||||
+ The [R](http://stoics.org.uk/~nicos/sware/packs/real/) interface package developed by Nicos Angelopoulos,
|
||||
Vítor Santos Costa, João Azevedo, Jan Wielemaker, and Rui Camacho.
|
162
packages/python/swig/setup.py.in
Normal file
162
packages/python/swig/setup.py.in
Normal file
@@ -0,0 +1,162 @@
|
||||
#!/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
|
||||
|
||||
from setuptools import setup
|
||||
from setuptools.extension import Extension
|
||||
from codecs import open
|
||||
from os import path, makedirs, walk
|
||||
from shutil import copytree, rmtree, copy2, move
|
||||
from glob import glob
|
||||
from pathlib import Path
|
||||
import platform
|
||||
import os.path
|
||||
|
||||
# the name of the package
|
||||
name = 'yap_kernel'
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Minimal Python version sanity check
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
import sys
|
||||
|
||||
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
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
from glob import glob
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from distutils.core import setup
|
||||
|
||||
pjoin = os.path.join
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
pkg_root = pjoin(here, name)
|
||||
|
||||
my_extra_link_args = []
|
||||
if platform.system() == 'Darwin':
|
||||
my_extra_link_args = ['-Wl,-rpath','-Wl,${_ABS_PYTHON_MODULE_PATH}']
|
||||
so = 'dylib'
|
||||
#or dll in glob('yap/dlls/*'):
|
||||
# move( dll ,'lib' )
|
||||
|
||||
|
||||
cplus=['${RELATIVE_SOURCE}CXX/yapi.cpp']
|
||||
|
||||
py2yap=['${RELATIVE_SOURCE}packages/python/python.c',
|
||||
'${RELATIVE_SOURCE}packages/python/pl2py.c',
|
||||
'${RELATIVE_SOURCE}packages/python/pybips.c',
|
||||
'${RELATIVE_SOURCE}packages/python/py2pl.c',
|
||||
'${RELATIVE_SOURCE}packages/python/pl2pl.c',
|
||||
'${RELATIVE_SOURCE}packages/python/pypreds.c'
|
||||
]
|
||||
|
||||
native_sources = ['yapPYTHON_wrap.cxx']+py2yap+cplus
|
||||
here = path.abspath(path.dirname(__file__))
|
||||
|
||||
# Get the long description from the README file
|
||||
|
||||
extensions=[Extension('_yap', native_sources,
|
||||
define_macros = [('MAJOR_VERSION', '1'),
|
||||
('MINOR_VERSION', '0'),
|
||||
('_YAP_NOT_INSTALLED_', '1'),
|
||||
('YAP_PYTHON', '1')],
|
||||
runtime_library_dirs=['yap4py','${libdir}','${bindir}'],
|
||||
swig_opts=['-modern', '-c++', '-py3','-I${RELATIVE_SOURCE}/CXX'],
|
||||
library_dirs=['../../..','../../../CXX','../../packages/python',"${dlls}","${bindir}", '.'],
|
||||
extra_link_args=my_extra_link_args,
|
||||
extra_compile_args=['-g3','-O0'],
|
||||
libraries=['Yap','${GMP_LIBRARIES}'],
|
||||
include_dirs=['../../..',
|
||||
'${GMP_INCLUDE_DIRS}',
|
||||
'${RELATIVE_SOURCE}H',
|
||||
'${RELATIVE_SOURCE}H/generated',
|
||||
'${RELATIVE_SOURCE}OPTYap',
|
||||
'${RELATIVE_SOURCE}os',
|
||||
'${RELATIVE_SOURCE}include',
|
||||
'${RELATIVE_SOURCE}CXX', '.']
|
||||
)]
|
||||
|
||||
packages = ['yap4py']
|
||||
|
||||
pls = []
|
||||
for (r,d,fs) in walk('dylib'):
|
||||
for f in fs:
|
||||
pls += [os.path.join(r, f)]
|
||||
for (r,d,fs) in walk('yss'):
|
||||
for f in fs:
|
||||
pls += [os.path.join(r, f)]
|
||||
for (r,d,fs) in walk('pl'):
|
||||
for f in fs:
|
||||
pls += [os.path.join(r, f)]
|
||||
for (r,d,fs) in walk('yap'):
|
||||
for f in fs:
|
||||
pls += [os.path.join(r, f)]
|
||||
|
||||
for d, _, _ in os.walk(pjoin(here, name)):
|
||||
if os.path.exists(pjoin(d, '__init__.py')):
|
||||
packages.append(d[len(here)+1:].replace(os.path.sep, '.'))
|
||||
|
||||
package_data = {
|
||||
'yap4pyl': pls,
|
||||
}
|
||||
|
||||
version_ns = {'__version__'='6.3','minor-version'='6','minor-version'='3','patch'='5'}
|
||||
|
||||
|
||||
setup_args = dict(
|
||||
name = name,
|
||||
version = version_ns['__version__'],
|
||||
scripts = glob(pjoin('scripts', '*')),
|
||||
packages = packages,
|
||||
py_modules = ['yap'],
|
||||
package_data = package_data,
|
||||
description = "YAP in Python",
|
||||
author = 'YAP Development Team',
|
||||
author_email = 'ipython-dev@scipy.org',
|
||||
url = 'http://ipython.org',
|
||||
license = 'BSD',
|
||||
extensions = ['extensions'],
|
||||
platforms = "Linux, Mac OS X, Windows",
|
||||
keywords = ['Interactive', 'Interpreter', 'Shell', 'Web'],
|
||||
classifiers = [
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: System Administrators',
|
||||
'Intended Audience :: Science/Research',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Programming Language :: Python',
|
||||
'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
|
||||
|
||||
setuptools_args = {}
|
||||
install_requires = setuptools_args['install_requires'] = [
|
||||
]
|
||||
|
||||
extras_require = setuptools_args['extras_require'] = {
|
||||
'test:python_version=="2.7"': ['mock'],
|
||||
'test': ['nose_warnings_filters', 'nose-timer'],
|
||||
}
|
||||
|
||||
if 'setuptools' in sys.modules:
|
||||
setup_args.update(setuptools_args)
|
||||
|
||||
if __name__ == '__main__':
|
||||
setup(**setup_args)
|
Reference in New Issue
Block a user