diff --git a/CHANGELOG.md b/CHANGELOG.md index c27b7d3..3dc23e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,14 @@ # CHANGELOG -### 0.2.11 (Not Released) +### 0.3.0 (Not Released) * Improve list representations, unicode support and multiple threading usage, see: [97](https://github.com/yuce/pyswip/pull/97). Contributed by Guglielmo Gemignani. * Added PL_STRINGS_MARK to getAtomChars, fixes [102](https://github.com/yuce/pyswip/issues/102). Contributed by Vince Jankovics. * Backwards compatibility for Python 2 64bit, see: [104](https://github.com/yuce/pyswip/pull/104). Contributed by Tobias Grubenmann. * Improved handling of lists, nested lists, strings, and atoms. see: [112](https://github.com/yuce/pyswip/pull/112). Contributed by Tobias Grubenmann. * Fixes for changed constants, see: [125](https://github.com/yuce/pyswip/pull/125). Contributed by Arvid Norlander. + * Refactored SWI-Prolog discovery [commit](https://github.com/yuce/pyswip/commit/d399f0d049ff17200b1b7e1cd878faf3e48502dc) + * ### 0.2.10 diff --git a/README.md b/README.md index ae1b700..24ea8ad 100644 --- a/README.md +++ b/README.md @@ -4,39 +4,18 @@ # PySwip ---- - -## Installing the Latest Version - -The latest SWI-Prolog supported by Ubuntu 22.04 are 9.0.4. -We generally want to support LTS releases of Ubuntu. -You can use the following to install PySwip from the master branch: - -``` -pip install git+https://github.com/yuce/pyswip@master#egg=pyswip -``` - -## The End of Python 2 Support - -Python 2 has reached end of life on January 1st, 2020 as documented [here](https://www.python.org/doc/sunset-python-2/). -So, PySwip 0.2.10 is the last version which officially supports Python 2. - ---- - ## What's New? See the [CHANGELOG](CHANGELOG.md). ---- - -**WARNING! PySwip has no Windows installers! -If you are a Windows user, see [INSTALL](https://github.com/yuce/pyswip/blob/master/INSTALL.md#windows). -There are some "free download" sites that claim to be hosting PySwip installers. -DO NOT TRUST THEM!** +## Install ---- +If you have SWI-Prolog installed, it's just: +``` +pip install pyswip +``` -Thanks to all [contributors](CONTRIBUTORS.txt). +See [INSTALL](INSTALL.md) for detailed instructions. ## Introduction @@ -45,20 +24,8 @@ It features an (incomplete) SWI-Prolog foreign language interface, a utility cla Since PySwip uses SWI-Prolog as a shared library and ctypes to access it, it doesn't require compilation to be installed. -## Requirements: - -* Python 3.8 and higher. - * PyPy is currently not supported. -* SWI-Prolog 9.0.4 and higher. -* `libswipl` as a shared library. *This is the default on most platforms.* -* Works on Linux, Windows, MacOS and FreeBSD. Should work on other POSIX. - -## Install - -**IMPORTANT: Make sure the SWI-Prolog architecture is the same as the Python architecture. -If you are using a 64bit build of Python, use a 64bit build of SWI-Prolog, etc.** - -See [INSTALL](INSTALL.md) for instructions. +PySwip was brought to you by the PySwip community. +Thanks to all [contributors](CONTRIBUTORS.txt). ## Examples @@ -203,7 +170,8 @@ If you would like to reference PySwip in a LaTeX document, you can use the provi * [MIDSI Project](https://github.com/devdaniellima/midsi) Solution for data discovery in projects applicable to the Semantic Web, enabling the loading of ontologies and inference of results using the WSML language. * [Popper](https://github.com/logic-and-learning-lab/Popper) An inductive logic programming system. -* [Trabajo Final](https://github.com/NicolasLeidi/Trabajo-Final) Ingeniería para Sistemas de Información - Nicolás Leidi +* [Trabajo Final](https://github.com/NicolasLeidi/Trabajo-Final) Ingeniería para Sistemas de Información (Spanish) +* [norms-games](https://github.com/nmontesg/norms-games) Integration of normative systems and game theory ### Blog Posts diff --git a/src/pyswip/core.py b/src/pyswip/core.py index 135ff12..ace53df 100644 --- a/src/pyswip/core.py +++ b/src/pyswip/core.py @@ -333,7 +333,7 @@ def find_swi_home(path) -> str: return "" -def _findSwipl() -> (str, str): +def _find_swipl() -> (str, str): """ This function makes a big effort to find the path to the SWI-Prolog shared library. Since this is both OS dependent and installation dependent, we may @@ -507,7 +507,7 @@ def check_and_call(*args): # Find the path and resource file. SWI_HOME_DIR shall be treated as a constant # by users of this module -_path, SWI_HOME_DIR = _findSwipl() +_path, SWI_HOME_DIR = _find_swipl() # Load the library _lib = CDLL(_path, mode=RTLD_GLOBAL)