Uh oh!
There was an error while loading. Please reload this page.
forked from efabless/libparse-python
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
37 lines (34 loc) · 1.03 KB
/
Copy pathsetup.py
File metadata and controls
37 lines (34 loc) · 1.03 KB
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
#!/usr/bin/env python3
importsys
importsubprocess
frompathlibimportPath
fromsetuptoolsimportsetup
frompybind11.setup_helpersimportPybind11Extension, build_ext
__file_dir__=Path(__file__).absolute().parent
__version__=subprocess.check_output(
[sys.executable, __file_dir__/"libparse"/"__version__.py"],
encoding="utf8",
).strip()
ext=Pybind11Extension(
"_libparse",
[
"libparse/wrapper.cpp",
"yosys/passes/techmap/libparse.cc",
],
include_dirs=["yosys/passes/techmap", "yosys"],
define_macros=[("FILTERLIB", "1"), ("_YOSYS_", "1")],
)
setup(
name="lln-libparse",
packages=["libparse"],
version=__version__,
description="Python wrapper around Yosys' libparse module",
long_description=open(__file_dir__/"Readme.md").read(),
long_description_content_type="text/markdown",
author="Mohamed Gaber",
author_email="me@donn.website",
install_requires=["wheel"],
python_requires=">=3.8",
ext_modules=[ext],
cmdclass={"build_ext": build_ext},
)