forked from AntonKueltz/fastecdsa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
75 lines (61 loc) · 2.07 KB
/
setup.py
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
from setuptools import setup, Extension, Command
class TestCommand(Command):
user_options = []
description = "Run all tests"
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
from subprocess import call
call(['python', '-m', 'fastecdsa.test'])
class BenchmarkCommand(Command):
user_options = []
description = "Benchmark this package"
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
from subprocess import call
call(['python', '-m', 'fastecdsa.benchmark'])
curvemath = Extension(
'fastecdsa.curvemath',
include_dirs=['src/'],
libraries=['gmp'],
sources=['src/curveMath.c', 'src/curve.c', 'src/point.c'],
extra_compile_args=['-O2']
)
_ecdsa = Extension(
'fastecdsa._ecdsa',
include_dirs=['src/'],
libraries=['gmp'],
sources=['src/_ecdsa.c', 'src/curveMath.c', 'src/curve.c', 'src/point.c'],
extra_compile_args=['-O2']
)
setup(
name='fastecdsa',
version='1.6.4',
author='Anton Kueltz',
author_email='[email protected]',
license='CC0 1.0 Universal (CC0 1.0) Public Domain Dedication',
keywords='elliptic curve cryptography ecdsa ecc',
description='Fast elliptic curve digital signatures',
long_description=''.join(open('README.rst', 'r').readlines()),
url='https://github.com/AntonKueltz/fastecdsa',
packages=['fastecdsa'],
ext_modules=[curvemath, _ecdsa],
cmdclass={'test': TestCommand, 'benchmark': BenchmarkCommand},
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Security :: Cryptography',
'License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
],
)