-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
64 lines (54 loc) · 2 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
import sys
from pathlib import Path
from setuptools import Extension
from setuptools import find_packages
from setuptools import setup
from setuptools.dist import Distribution
__VERSION__ = "0.26.0"
def get_ext_modules():
ext_modules = []
if "--platlib-patch" in sys.argv:
if sys.platform.startswith("linux"):
# Manylinux2010 requires a patch for platlib
ext_modules = [Extension("_foo", ["stub.cc"])]
sys.argv.remove("--platlib-patch")
return ext_modules
class BinaryDistribution(Distribution):
"""This class is needed in order to create OS specific wheels."""
def has_ext_modules(self):
return True
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="tfmiss",
version=__VERSION__,
description="Missing layers, ops & etc. for TensorFlow",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/shkarupa-alex/tfmiss",
author="Shkarupa Alex",
author_email="[email protected]",
packages=find_packages(),
ext_modules=get_ext_modules(),
install_requires=Path("requirements.txt").read_text().splitlines(),
include_package_data=True,
zip_safe=False,
distclass=BinaryDistribution,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
],
license="MIT",
keywords="tensorflow layers ops",
)