-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
46 lines (36 loc) · 1.46 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
# if setuptools is detected, use it to add support for eggs
try:
from setuptools import setup, Extension
except:
from distutils.core import setup
from distutils.extension import Extension
from distutils.util import get_platform
from distutils.ccompiler import get_default_compiler
import sys
import os
extra_compile_args=[]
extra_link_args=[]
if sys.platform == "linux" or sys.platform == "linux2":
extra_compile_args.append("-msse4.1")
elif sys.platform == "cygwin":
extra_compile_args.append("-msse4.1")
extra_link_args.append("-Wl,--enable-runtime-pseudo-reloc")
elif sys.platform == "darwin":
extra_link_args.append("-shared-libgcc")
define_macros = [('_FILE_OFFSET_BITS', '64'),('__GOST3411_HAS_SSE41__','1')]
module_ex = Extension('_pystribog',
define_macros = define_macros ,
extra_compile_args=extra_compile_args,
extra_link_args = extra_link_args,
sources = [
'src/gost3411-2012-core.c',
'src/module.c',
'src/hash.c'
])
setup (name = 'pyStribog',
version = '0.3',
description = 'GOST 34.11-2012 cryptography (streebog) hash 256/512 function',
author = "Dmitry Dulesov",
author_email = "dmitry.dulesov@gmail.com",
url = "https://github.com/ddulesov/pystribog",
ext_modules = [ module_ex ])