-
Notifications
You must be signed in to change notification settings - Fork 78
/
pyproject.toml
152 lines (134 loc) · 5.24 KB
/
pyproject.toml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# This file contains the project metadata as defined in PEP621, as well as
# custom compilation and linking flags. Non-expert users should only modify
# the following sections:
# - [cpplibraries.SEAL.cmake-opts]
#===============================================================================
#============================== PROJECT METADATA ===============================
#===============================================================================
# Pyfhel's core metadata
[project]
name = "Pyfhel"
version = "3.1.4"
description = "Python for Homomorphic Encryption Libraries"
readme = "README.md"
requires-python = ">=3.7"
license = {text = "GNU GPLv3"}
keywords = ["homomorphic" , "encryption", "cython", "cryptography"]
authors = [
{name = "Alberto Ibarrondo", email = "ibarrond@eurecom.fr"},
{name = "Alexander Viand", email = "alexander.viand@inf.ethz.ch"},
]
classifiers = [
"Programming Language :: C++",
"Programming Language :: Cython",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: Unix",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Topic :: Security",
"Topic :: Security :: Cryptography",
]
dependencies = [
"numpy>=1.20"
]
platforms = ["Linux", "Windows"]
[project.optional-dependencies]
test = [
"pytest >= 6.0.0",
]
[project.urls]
homepage = "https://pyfhel.readthedocs.io"
documentation = "https://pyfhel.readthedocs.io"
repository = "https://github.com/ibarrond/github"
# Minimum requirements for the build system to execute.
[build-system]
requires = [
"setuptools<=60.9",
"wheel",
"cython>=3.0.0a9",
"numpy>=1.20",
"cmake>=3.15",
"toml>=0.10"
]
build-backend = "setuptools.build_meta"
#===============================================================================
#========================= COMPILATION CONFIGURATION ===========================
#===============================================================================
# Compile & link configuration for C/C++ libraries and extensions
# - Libs in mode 'cmake' are compiled running `cmake` inside source_dir.
# - Libs in mode 'standard' are compiled using the default platform compiler.
#------------------------------ C/C++ LIBRARIES --------------------------------
[cpplibraries]
#--> SEAL
[cpplibraries.SEAL]
mode = 'cmake' # standard/cmake
lib_type = 'static' # static/shared
# source_dir: dir with the top CMakeLists.txt.
source_dir = 'Pyfhel/backend/SEAL'
include_dirs = [
'Pyfhel/backend/SEAL/native/src',
'Pyfhel/backend/SEAL/thirdparty/msgsl-src/include'
]
## Build-relative dirs:
# -> paths are relative to build directory.
# built_library_dir: output dir containing the cmake-built libs
built_library_dir='lib'
# built_include_dirs: dirs with cmake-built headers.
built_include_dirs=['native/src']
## CMake options: https://github.com/microsoft/SEAL/#basic-cmake-options
[cpplibraries.SEAL.cmake_opts]
CMAKE_BUILD_TYPE = 'Release'
SEAL_USE_INTEL_HEXL ='OFF' # ON/OFF, use Intel HEXL for low-level kernels
SEAL_USE_ALIGNED_ALLOC ='OFF'# ON/OFF, 64B aligned memory allocations, better perf with Intel HEXL.
BUILD_SHARED_LIBS ='OFF' # ON/OFF, build shared and not static library
SEAL_THROW_ON_TRANSPARENT_CIPHERTEXT='ON' # ON/OFF, runtime error when multiplying a ctxt with a zeroed plaintext.
#--> Afhel
[cpplibraries.Afhel]
mode = 'standard' # standard/cmake
lib_type = 'shared' # static/shared
sources = ['Pyfhel/Afhel/Afseal.cpp',]
include_dirs = ['Pyfhel/Afhel',]
define_macros = []
extra_compile_args = [
{Windows = ["/O2","/std:c++17"]},
{Linux = ["-std=c++17","-O3","-fopenmp"]} ]
extra_link_args = [
{Windows = []},
{Linux = ["-Wl,-rpath=$ORIGIN/.", "-fopenmp"]} ]
libraries = ['SEAL']
#----------------------------- CYTHON EXTENSIONS -------------------------------
[extensions.config] # Common compilation config for all extensions
include_dirs = []
define_macros = [
["NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION"],
["__PYX_ENUM_CLASS_DECL", "enum"], # Support enums in cython
]
extra_compile_args = [
{Windows = ["/O2","/openmp","/std:c++17"]},
{Linux = ["-std=c++17","-O3","-fopenmp"]},
]
extra_link_args = [
{Windows = []},
{Linux = ["-Wl,-rpath=$ORIGIN/.", "-fopenmp"]},
]
libraries = [] # libraries to link with, cpplibraries above are added by default
# List of extensions to compile. Custom compilation config can be defined for each
[extensions.Pyfhel]
fullname='Pyfhel.Pyfhel'
sources=['Pyfhel/Pyfhel.pyx']
[extensions.PyCtxt]
fullname='Pyfhel.PyCtxt'
sources=['Pyfhel/PyCtxt.pyx']
[extensions.PyPtxt]
fullname='Pyfhel.PyPtxt'
sources=['Pyfhel/PyPtxt.pyx']
[extensions.PyPoly]
fullname='Pyfhel.PyPoly'
sources=['Pyfhel/PyPoly.pyx']