-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathsetup.py
33 lines (29 loc) · 1.04 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
import os
import re
import setuptools
# for simplicity we actually store the version in the __version__ attribute in the source
here = os.path.realpath(os.path.dirname(__file__))
print(here)
with open(os.path.join(here, 'fastDP', '__init__.py')) as f:
meta_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", f.read(), re.M)
if meta_match:
version = meta_match.group(1)
else:
raise RuntimeError("Unable to find __version__ string.")
with open(os.path.join(here, 'README.md')) as f:
readme = f.read()
setuptools.setup(
name="fastDP",
version=version,
author="Zhiqi Bu",
author_email="[email protected]",
description="Optimally efficient implementation of differentially private optimization (with per-sample gradient clipping.",
long_description=readme,
url="",
packages=setuptools.find_packages(exclude=['examples', 'tests']),
python_requires='~=3.8',
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
],
)