-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathsetup.py
34 lines (27 loc) · 1.14 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
import os
from setuptools import setup, Extension
CFLAGS = os.environ.get('CFLAGS', '').strip()
if CFLAGS:
extra_compile_args = CFLAGS.split()
else:
extra_compile_args = (
['-O3', '-funroll-loops', '-fomit-frame-pointer']
if os.environ.get('PLATFORM', '') == 'arm'
else ['-O3'])
scrypt_module = Extension('scrypt',
sources=['./algos/scrypt/scryptmodule.c',
'./algos/scrypt/scrypt.c'],
extra_compile_args=extra_compile_args,
include_dirs=['./algos/scrypt'])
yescrypt_module = Extension('yescrypt',
sources=['./algos/yescrypt/yescrypt.c'],
extra_compile_args=extra_compile_args,
include_dirs=['./algos/yescrypt'])
setup(name='scrypt',
version='1.0',
description='Bindings for scrypt proof of work',
ext_modules=[scrypt_module])
setup(name='yescrypt',
version='1.0',
description='Bindings for yescrypt proof of work',
ext_modules=[yescrypt_module])