forked from jeffreysijuntan/CryptGPU
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
56 lines (46 loc) · 1.57 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
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os.path
import re
import sys
import setuptools
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "crypten"))
# Read description and requirements.
with open("README.md", encoding="utf8") as f:
readme = f.read()
with open("requirements.txt") as f:
reqs = f.read()
# get version string from module
init_path = os.path.join(os.path.dirname(__file__), "crypten/__init__.py")
with open(init_path, "r") as f:
version = re.search(r"__version__ = ['\"]([^'\"]*)['\"]", f.read(), re.M).group(1)
# Set key package information.
DISTNAME = "cryptgpu"
DESCRIPTION = "CryptGPU"
LONG_DESCRIPTION = readme
AUTHOR = "Sijun Tan, Brian Knott, Yuan Tian, and David J. Wu"
LICENSE = ""
REQUIREMENTS = (reqs.strip().split("\n"),)
VERSION = version
# Run installer.
if __name__ == "__main__":
if sys.version_info < (3, 7):
sys.exit("Sorry, Python >=3.7 is required for CrypTen.")
setuptools.setup(
name=DISTNAME,
install_requires=REQUIREMENTS,
packages=setuptools.find_packages(),
dependency_links=[],
version=VERSION,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
url="https://github.com/jeffreysijuntan/CryptGPU",
author=AUTHOR,
license=LICENSE,
setup_requires=["pytest-runner"],
tests_require=["pytest"],
)