From 37f5210ab9127f0be6d0d205b8e34f67c9a44e83 Mon Sep 17 00:00:00 2001 From: wqy Date: Sat, 13 Jan 2024 11:38:52 +0800 Subject: [PATCH] Build pyd --- .gitignore | 7 ++++++- build_pyd.py | 4 ++++ install.py | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 build_pyd.py diff --git a/.gitignore b/.gitignore index 8ee672d..f74ed1d 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,9 @@ build_db.py *.opt.json # todo -TODO.md \ No newline at end of file +TODO.md + +# build pyd +build +*.c +*.pyd \ No newline at end of file diff --git a/build_pyd.py b/build_pyd.py new file mode 100644 index 0000000..03e01de --- /dev/null +++ b/build_pyd.py @@ -0,0 +1,4 @@ +from distutils.core import setup +from Cython.Build import cythonize + +setup(ext_modules=cythonize("tjnetwork.py")) \ No newline at end of file diff --git a/install.py b/install.py index fca9f0d..f657d33 100644 --- a/install.py +++ b/install.py @@ -18,7 +18,8 @@ def install(): packages = [ '"psycopg[binary]"', 'pytest', - 'numpy'] + 'numpy', + 'Cython'] if minor == 4: packages.append('script/package/PyMetis-2018.1-cp34-cp34m-win_amd64.whl')