This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
setup.py
58 lines (52 loc) · 1.78 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
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# Inspired from https://github.com/kennethreitz/setup.py
from pathlib import Path
from setuptools import setup, Extension
from Cython.Build import cythonize
NAME = 'diffq'
DESCRIPTION = ('Differentiable quantization framework for PyTorch.')
URL = 'https://github.com/facebookresearch/diffq'
EMAIL = '[email protected]'
AUTHOR = 'Alexandre Défossez, Yossi Adi, Gabriel Synnaeve'
REQUIRES_PYTHON = '>=3.7.0'
for line in open('diffq/__init__.py'):
line = line.strip()
if '__version__' in line:
context = {}
exec(line, context)
VERSION = context['__version__']
HERE = Path(__file__).parent
try:
with open(HERE / "README.md", encoding='utf-8') as f:
long_description = '\n' + f.read()
except FileNotFoundError:
long_description = DESCRIPTION
setup(
name=NAME,
version=VERSION,
description=DESCRIPTION,
long_description=long_description,
long_description_content_type='text/markdown',
author=AUTHOR,
author_email=EMAIL,
python_requires=REQUIRES_PYTHON,
url=URL,
packages=['diffq'],
install_requires=['Cython', 'numpy', 'torch'],
ext_modules=cythonize([Extension(
"diffq.bitpack",
sources=["bitpack.pyx"])]),
extras_require={'dev': ['coverage', 'flake8', 'pdoc3', 'torchvision']},
include_package_data=True,
license='Creative Commons Attribution-NonCommercial 4.0 International',
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
'Topic :: Scientific/Engineering :: Artificial Intelligence',
],
)