Skip to content

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

2 watching

Forks

Repository files navigation

Primecount Cython interface

This is a Cython interface to the C++ library primecount.

We have split out primecount SageMath spkg with its Cython interface.

Quick installation and testing:

  1. Install primecount C++ library: either
    • install primecount version 8 or later with its development parts system-wide, using your package manager, or
    • install it from source, as follows
cd /tmp/
git clone https://github.com/kimwalisch/primecount
cd primecount
cmake . -DBUILD_SHARED_LIBS=ON
make -j
sudo make install
sudo ldconfig # linux only
  1. In this repo, do
pip install . --user --config-settings=setup-args="--wrap-mode=nodownload"
  1. Test with pytest
pytest

Alternatively, if you built with Meson, you can run tests via:

meson test -v -C builddir

where builddir is your Meson build directory.

python3 and

>>> import primecountpy as primecount
>>> primecount.prime_pi(1000)

More details on installation without root (sudo) access may be found in the manual, which is also included in docs.

License

Distributed under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages