-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
80 lines (70 loc) · 2.98 KB
/
setup.py
File metadata and controls
80 lines (70 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#! /usr/bin/env python3
from distutils.core import setup
# Futz with the path so we can import metadata.
import os, sys
here = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(here, 'src'))
from pyprimes import __version__, __author__, __author_email__
# Work around mbcs bug in distutils.
# http://bugs.python.org/issue10945
import codecs
try:
codecs.lookup('mbcs')
except LookupError:
ascii = codecs.lookup('ascii')
func = lambda name, enc=ascii: {True: enc}.get(name=='mbcs')
codecs.register(func)
setup(
name = "pyprimes",
package_dir={'': 'src'},
packages = ['pyprimes'],
version = __version__,
author = __author__,
author_email = __author_email__,
url = 'http://code.google.com/p/pyprimes/',
keywords = sorted([
'algorithm', 'eratosthenes', 'factors', 'fermat', 'math', 'maths',
'miller-rabin', 'primality', 'prime', 'primes', 'sieve',
]),
description = "Generate and test for prime numbers.",
long_description = """\
The pyprimes package offers a variety of algorithms for generating prime
numbers and fast primality tests, written in pure Python.
Prime numbers are those positive integers which are not divisible exactly
by any number other than itself or one. Generating primes and testing for
primality has been a favourite mathematical pastime for centuries, as well
as of great practical importance for encrypting data.
``pyprimes`` includes the following features:
- Produce prime numbers lazily, on demand.
- Effective algorithms including Sieve of Eratosthenes, Croft Spiral,
and Wheel Factorisation.
- Efficiently test whether numbers are prime, using both deterministic
(exact) and probabilistic primality tests.
- Examples of what *not* to do are provided, including naive trial
division, Turner's algorithm, and primality testing using a
regular expression.
- Factorise small numbers into the product of prime factors.
- Suitable for Python 2.4 through 3.x from one code base.
""",
license = 'MIT', # apologies for the American spelling
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"Programming Language :: Python :: 2.4",
"Programming Language :: Python :: 2.5",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.0",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Mathematics",
"License :: OSI Approved :: MIT License",
],
)