Skip to main content

JHeaps library

Project description

Build Status

Python-JHeaps

Python bindings for the JHeaps library.

The JHeaps is a free Java library that provides various heap implementations.

While the original library is written in Java, this package uses a native build provided by the jheaps-capi project. The native build is in the form of a shared library, created by GraalVM.

The result is a native self-contained library with no dependency on the JVM!

Installing

We automatically build 64-bit wheels for python versions 3.6, 3.7, and 3.8 on Linux, Windows and MacOSX. They can be directly downloaded from PyPI or using pip. For linux we use PEP 571 which means that pip version must be >= 19.0.

Thus, on a recent machine, installation should be as easy as:

pip install jheaps

If your pip version is older than 19.0 you will need to upgrade:

pip install --upgrade pip
pip install jheaps

If you want to use virtualenv or venv module, you can write:

python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install jheaps

Installation on the user directory is also possible:

pip install --upgrade pip
pip install --user jheaps

Documentation

Automatically generated documentation with a tutorial and examples can be found at https://python-jheaps.readthedocs.io/. This includes full API docs, tutorials and examples.

Building

The jheaps-capi project is included in the sources as a git submodule in folder vendor/source/jheaps-capi. You need to either initialize the submodule by hand, or you can pass option --recurse-submodules when cloning this repository.

The following pieces of software are required for the build to succeed:

  • GraalVM 20.0 with Java 11 support
  • Native Image component from GraalVM
  • Maven Java build tool
  • GNU C compiler or clang
  • CMake
  • Python 3.6 and above
  • SWIG 3 and above

If all the above are installed properly, building can be done using

python setup.py build

For Windows you will need Microsoft Visual C++ (MSVC) 2017 15.5.5 or later. Build the system using the proper Developer Command Prompt for your version of Visual Studio. This means x64 Native Tools Command Prompt. Use Visual Studio 2017 or later.

Install

Install using

pip install .

Develop

Since the library contains parts which are written in C that need to be compiled before use, make sure you have the necessary compilers and development headers installed. Compiled code means that additional steps are required in order to import from the development sources. Using the following commands you can setup an in-place development environment:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

This allows you to import the in-place build from the repository base directory. If you want it to also be visible outside the base dir, you have to adjust the PYTHONPATH accordingly. Note also that the above commands call python setup.py develop. Instead of adjusting PYTHONPATH, this installs a .egg-link file into your site-packages as well as adjusts the easy-install.pth there, so its a more permanent operation.

Tests

Execute the tests by giving

pip install -r requirements/test.txt
pytest

Building the docs

pip install -r requirements/doc.txt
cd docs && make html

License

This library may be used under the terms of the

Please note that this library is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Please refer to the license for details.

SPDX-License-Identifier: Apache-2.0

Author

(C) Copyright 2020, by Dimitrios Michail

Enjoy!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jheaps-0.14.0.tar.gz (53.1 kB view details)

Uploaded Source

Built Distributions

jheaps-0.14.0-cp38-cp38-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.8 Windows x86-64

jheaps-0.14.0-cp38-cp38-manylinux2010_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

jheaps-0.14.0-cp38-cp38-macosx_10_13_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

jheaps-0.14.0-cp37-cp37m-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.7m Windows x86-64

jheaps-0.14.0-cp37-cp37m-manylinux2010_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

jheaps-0.14.0-cp37-cp37m-macosx_10_13_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

jheaps-0.14.0-cp36-cp36m-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.6m Windows x86-64

jheaps-0.14.0-cp36-cp36m-manylinux2010_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

jheaps-0.14.0-cp36-cp36m-macosx_10_13_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

File details

Details for the file jheaps-0.14.0.tar.gz.

File metadata

  • Download URL: jheaps-0.14.0.tar.gz
  • Upload date:
  • Size: 53.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/2.7.12

File hashes

Hashes for jheaps-0.14.0.tar.gz
Algorithm Hash digest
SHA256 30bc0bd64e5e1b51739c36aac36fe222e4160c66997589302798a7e6015c90a1
MD5 276f79dc75f86f81183f6b54fb254a9c
BLAKE2b-256 d19e7d49d300c7cb90bb0f6fc23ef272c9be25a2276d9dc490f58d58d3b54b91

See more details on using hashes here.

File details

Details for the file jheaps-0.14.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: jheaps-0.14.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.2

File hashes

Hashes for jheaps-0.14.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 035a33b88589057e4ef465b73ded6cd41219024ffc1ad92cecf12b08f4ce94e4
MD5 f6a2e24bdf0e694a484c966ece1f319c
BLAKE2b-256 142faa5fd2e103e64f2a6c953c02e2ac57ce25373c95149934c5b69eb8db6bba

See more details on using hashes here.

File details

Details for the file jheaps-0.14.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: jheaps-0.14.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/2.7.12

File hashes

Hashes for jheaps-0.14.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e92eda6591b0d3fac1dd1bf72edad2bf120df26968858bc1850df4f4fd02e8a8
MD5 a05eab4f24f74b8d8f9bce9055ff76f4
BLAKE2b-256 7e77162dcc907e2a596f280efc98b0c5390b04c1cbce495a98a4b7ecd24a97b3

See more details on using hashes here.

File details

Details for the file jheaps-0.14.0-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: jheaps-0.14.0-cp38-cp38-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.8, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.5

File hashes

Hashes for jheaps-0.14.0-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 cb580f8df38ffabc2eab0b7dd49857d093adb43973a221139349c06217b2444f
MD5 8ea0fc2fe70ec6fb7b8c7c0c538e46ed
BLAKE2b-256 6e6922bc84232aea41a6231e7401b0b0b7d91bdf7469c4980aede75e36ed11d3

See more details on using hashes here.

File details

Details for the file jheaps-0.14.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: jheaps-0.14.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.2

File hashes

Hashes for jheaps-0.14.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 9835d826fe0b7809752b26d2880f0f30293374f82f66b072ac832649569948d7
MD5 6062f47e6bdfc9412fe2f2c3046d8e15
BLAKE2b-256 34bc5f8aac28c9574a34765be0dba9b98f0ca22bf49da92b3d3d87de9490b28d

See more details on using hashes here.

File details

Details for the file jheaps-0.14.0-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: jheaps-0.14.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/2.7.12

File hashes

Hashes for jheaps-0.14.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f332da4c5d22ffd6cf28d225ed8d779c68c20ca412905a7e29f230ee6d797ffe
MD5 013e457c7529f80f0a2e8076f73b5e74
BLAKE2b-256 a63c56faa3760c3c43093718d8f7d9f120727c89e5531f1b935abebdb04782cc

See more details on using hashes here.

File details

Details for the file jheaps-0.14.0-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: jheaps-0.14.0-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.5

File hashes

Hashes for jheaps-0.14.0-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 3c5d9017cdd299489871fcf7174489031ba54fa6622725bb8f2e56d22943b568
MD5 88ce61106221bbf8a795ca0d2b6890de
BLAKE2b-256 1b27b9e998149f539b78e2aafe9be3b19da8b4fe82fc8e8202d6cfa3dc9d6045

See more details on using hashes here.

File details

Details for the file jheaps-0.14.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: jheaps-0.14.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.2

File hashes

Hashes for jheaps-0.14.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 98150f24f095946fc7d6f91831ca3bffc7a19b03f2d52e61b2e6e8224ffa7703
MD5 0d6fca996302f47b40c5b40d0710e442
BLAKE2b-256 d5facd688a8c3883b40251892c105c9bf68bd621079d2182a020514be4bf593c

See more details on using hashes here.

File details

Details for the file jheaps-0.14.0-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: jheaps-0.14.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/2.7.12

File hashes

Hashes for jheaps-0.14.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b4d653a700532c8bc10fd068d1bab088779191f35ebbfd15d54969543e04ee7e
MD5 4626901f32eec07b2db1f5703e268fe5
BLAKE2b-256 4a1a4a0be2fcbb400bb2980ea043291b5d6d6d137428ceca7db851284bb35432

See more details on using hashes here.

File details

Details for the file jheaps-0.14.0-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: jheaps-0.14.0-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.5

File hashes

Hashes for jheaps-0.14.0-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d492c566c9971831477093d48ed5c4959c66c806e8a19cf2dbe218af8e9cdef6
MD5 68ed5b5c565fdcaaea222ec1754b25af
BLAKE2b-256 4cece72e5b4a508f734aa715ee4fc5e0b6fd985d375f80d96d13161c3628b00f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page