forked from OpenMined/PySyft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
63 lines (54 loc) · 2.39 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
import os
from setuptools import find_packages
from setuptools import setup
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def get_requirements(req_file):
"""Read requirements file and return packages and git repos separately"""
requirements = []
dependency_links = []
lines = read(req_file).split("\n")
for line in lines:
if line.startswith("git+"):
dependency_links.append(line)
else:
requirements.append(line)
return requirements, dependency_links
REQ_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "pip-dep")
core_reqs, core_dependency_links = get_requirements(os.path.join(REQ_DIR, "requirements.txt"))
udacity_extras = read(os.path.join(REQ_DIR, "requirements_udacity.txt")).split("\n")
tensorflow_extras = read(os.path.join(REQ_DIR, "requirements_tensorflow.txt")).split("\n")
notebook_extras = read(os.path.join(REQ_DIR, "requirements_notebooks.txt")).split("\n")
dev_extras = read(os.path.join(REQ_DIR, "requirements_dev.txt")).split("\n")
sandbox_extras = ["scikit-learn>=0.21.0"]
tests_require = ["pytest", "pytest-flake8"] + sandbox_extras + notebook_extras
setup(
name="syft",
version="0.2.1a1",
author="Andrew Trask",
author_email="[email protected]",
description=("A Library for Private, Secure Deep Learning"),
license="Apache-2.0",
keywords="deep learning artificial intelligence privacy secure multi-party computation federated learning differential privacy",
packages=find_packages(exclude=["docs", "examples", "dist"]),
include_package_data=True,
long_description=read("README.md"),
long_description_content_type="text/markdown",
url="https://github.com/OpenMined/PySyft",
install_requires=core_reqs,
extras_require={
"udacity": udacity_extras,
"notebooks": notebook_extras,
"dev": dev_extras,
"sandbox": sandbox_extras,
"tensorflow": tensorflow_extras,
},
dependency_links=core_dependency_links,
setup_requires=["pytest-runner"],
tests_require=tests_require,
classifiers=["Programming Language :: Python :: 3", "Operating System :: OS Independent"],
)