-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
52 lines (47 loc) · 2.07 KB
/
setup.py
File metadata and controls
52 lines (47 loc) · 2.07 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
# Nescient: A Python program for packing/unpacking encrypted, salted, and authenticated file containers.
# Copyright (C) 2018 Ariel Antonitis. Licensed under the MIT license.
#
# setup.py
import sys
from setuptools import setup
from setuptools.extension import Extension
from nescient import __version__, url
with open('README.rst', 'r') as f:
long_description = f.read()
# Compiler arguments are different for Windows and Linux,
# try to use OpenMP on both
if sys.platform.startswith('win32'):
extra_compile_args = ['/openmp', '/Ox']
extra_link_args = ['/openmp', '/Ox']
else:
extra_compile_args = ['-fopenmp', '-O3']
extra_link_args = ['-fopenmp', '-O3']
USE_CYTHON = False
ext = 'pyx' if USE_CYTHON else 'c'
extensions = [Extension('nescient.crypto.aes', ['nescient/crypto/aes.%s' % ext]),
Extension('nescient.crypto.chacha', ['nescient/crypto/chacha.%s' % ext],
extra_compile_args=extra_compile_args, extra_link_args=extra_link_args)]
if USE_CYTHON:
from Cython.Build import cythonize
extensions = cythonize(extensions)
setup(name='Nescient',
version=__version__,
description='Store, encrypt and decrypt files to and from encrypted, authenticated containers.',
long_description=long_description,
author='Ariel Antonitis',
author_email='arant@mit.edu',
url=url,
packages=['nescient', 'nescient.crypto', 'nescient.resources'],
package_data={'nescient': ['*.png', '*.ico'], 'nescient.crypto': ['*.pyx', '*.pxd'],
'nescient.resources': ['*gif']},
ext_modules=extensions,
entry_points={'console_scripts': ['nescient = nescient.__main__:main'],
'gui_scripts': ['nescient-ui = nescient.gui:main']},
license='MIT',
classifiers=['License :: OSI Approved :: MIT License',
'Development Status :: 4 - Beta',
'Topic :: Security :: Cryptography',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'],
python_requires='>=3.5'
)