Skip to content

Commit 9e1cce8

Browse files
committed
fix build_py
1 parent e8270fe commit 9e1cce8

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

setup.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
module_name = "libparse"
88
__dir__ = os.path.dirname(os.path.abspath(__file__))
99

10-
subprocess.check_call(["make", "patch"], cwd=__dir__)
11-
1210
ext = Extension(
1311
name="_libparse",
1412
swig_opts=["-c++"],
@@ -22,16 +20,16 @@
2220
extra_compile_args=["-std=c++11", "-DFILTERLIB"],
2321
)
2422

25-
2623
class build_py(_build_py):
27-
def run(self):
24+
def run(self) -> None:
25+
subprocess.check_call(["make", "patch"], cwd=__dir__)
2826
self.run_command("build_ext")
2927
return super().run()
30-
28+
3129
setup(
3230
name=module_name,
3331
packages=["libparse"],
34-
version="0.1.4",
32+
version="0.1.5",
3533
description="Python wrapper around Yosys' libparse module",
3634
long_description=open("Readme.md").read(),
3735
long_description_content_type="text/markdown",
@@ -47,6 +45,7 @@ def run(self):
4745
],
4846
python_requires=">3.6",
4947
ext_modules=[ext],
50-
build_py=build_py,
51-
package_data = {'': ['libparse.py']} # needed for sdist
48+
cmdclass={
49+
'build_py': build_py,
50+
},
5251
)

0 commit comments

Comments
 (0)