forked from pytorch/opacus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
85 lines (71 loc) · 2.42 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
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
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import os
import sys
from setuptools import find_packages, setup
# 3.6.8 is the final Windows binary release for 3.6.x
REQUIRED_MAJOR = 3
REQUIRED_MINOR = 6
REQUIRED_MICRO = 8
version = {}
with open("opacus/version.py") as fp:
exec(fp.read(), version)
__version__ = version["__version__"]
# Check for python version
if sys.version_info < (REQUIRED_MAJOR, REQUIRED_MINOR, REQUIRED_MICRO):
error = (
"Your version of python ({major}.{minor}.{micro}) is too old. You need "
"python >= {required_major}.{required_minor}.{required_micro}"
).format(
major=sys.version_info.major,
minor=sys.version_info.minor,
micro=sys.version_info.micro,
required_major=REQUIRED_MAJOR,
required_minor=REQUIRED_MINOR,
required_micro=REQUIRED_MICRO,
)
sys.exit(error)
src_dir = os.path.abspath(os.path.dirname(__file__))
with open("README.md", "r", encoding="utf8") as fh:
long_description = fh.read()
requirements_txt = os.path.join(src_dir, "requirements.txt")
with open("requirements.txt", encoding="utf8") as f:
required = f.read().splitlines()
with open("dev_requirements.txt", encoding="utf8") as f:
dev_required = f.read().splitlines()
setup(
name="opacus",
version=__version__,
author="The Opacus Team",
description="Train PyTorch models with Differential Privacy",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://opacus.ai",
project_urls={
"Documentation": "https://opacus.ai/api",
"Source": "https://github.com/pytorch/opacus",
},
license="Apache-2.0",
install_requires=required,
extras_require={"dev": dev_required},
packages=find_packages(),
keywords=[
"PyTorch",
"Differential Privacy",
"DP-SGD",
"DP SGD",
"Privacy Preserving Machine Learning",
"PPML",
"PPAI",
],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
],
python_requires=f">={REQUIRED_MAJOR}.{REQUIRED_MINOR}.{REQUIRED_MICRO}",
)