-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
48 lines (45 loc) · 1.44 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
import setuptools
import sys
if sys.platform == "linux":
extension = [
setuptools.Extension(
"_fastseqio",
sources=["./python/fastseqio.cc"],
include_dirs=[".", "python/pybind11/include", "./deps/zlib"],
extra_objects=["./zig-out/lib/libseqio.a"],
extra_compile_args=["-std=c++11"],
)
]
elif sys.platform == "win32":
extension = [
setuptools.Extension(
"_fastseqio",
sources=["./python/fastseqio.cc"],
include_dirs=[".", "python/pybind11/include", "./deps/zlib"],
extra_objects=["./zig-out/lib/seqio.lib"],
)
]
elif sys.platform == "darwin":
extension = [
setuptools.Extension(
"_fastseqio",
sources=["./python/fastseqio.cc"],
include_dirs=[".", "python/pybind11/include", "./deps/zlib"],
extra_objects=["./zig-out/lib/libseqio.a"],
extra_compile_args=["-std=c++11"],
)
]
else:
raise ValueError("Unsupported platform: " + sys.platform)
setuptools.setup(
name="fastseqio",
version="0.1.3",
author="dwpeng",
author_email="[email protected]",
license="MIT",
url="https://github.com/dwpeng/fastseqio",
description="A package for reading and writing fasta/fastq files",
packages=setuptools.find_namespace_packages(where="./python/src"),
package_dir={"": "./python/src"},
ext_modules=extension,
)