forked from AntonKueltz/fastecdsa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
61 lines (53 loc) · 1.89 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
from setuptools import find_packages, setup, Extension, Command
from sys import executable
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, PIPE
call([executable, 'setup.py', 'build_ext', '--inplace'], stdout=PIPE)
call([executable, '-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(
author='Anton Kueltz',
author_email='kueltz.anton@gmail.com',
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 :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
],
cmdclass={'benchmark': BenchmarkCommand},
description='Fast elliptic curve digital signatures',
ext_modules=[curvemath, _ecdsa],
keywords='elliptic curve cryptography ecdsa ecc',
license='CC0 1.0 Universal (CC0 1.0) Public Domain Dedication',
long_description=''.join(open('README.rst', 'r').readlines()),
name='fastecdsa',
packages=find_packages(),
url='https://github.com/AntonKueltz/fastecdsa',
version='2.2.1',
)