-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathsetup.py
More file actions
29 lines (23 loc) · 822 Bytes
/
setup.py
File metadata and controls
29 lines (23 loc) · 822 Bytes
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
import subprocess
from setuptools import setup
from pybind11 import get_cmake_dir
from cmake_build import CMakeBuild, CMakeExtension
rev = '+' + subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'
]).decode('ascii').rstrip()
version = "1.4.0" + rev
cpp_module = CMakeExtension(
name="ffrecord._ffrecord_cpp",
sourcedir="ffrecord/src",
cmake_args=[f"-DPYBIND11_CMAKE_DIR={get_cmake_dir()}"]
)
setup(cmdclass={"build_ext": CMakeBuild},
name='ffrecord',
version=version,
description='Fileflyer Record file format',
author='HFAiLab',
license='MIT',
python_requires='>=3.6',
install_requires=['torch>=1.6', 'pybind11>=2.8', 'tqdm'],
packages=['ffrecord', 'ffrecord/torch'],
ext_modules=[cpp_module]
)