Created
February 18, 2021 17:08
-
-
Save SoutrikBandyopadhyay/fb6c3b029a1e6647566e5f3d32e21538 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| x = '''from setuptools import setup | |
| from Cython.Build import cythonize | |
| import numpy | |
| import scipy | |
| setup( | |
| include_dirs=[numpy.get_include(),scipy.get_include()], | |
| ext_modules = cythonize("*.pyx",annotate=True, build_dir= "build", compiler_directives={'language_level' : "3"}) | |
| )''', | |
| main = input("Enter the name of main python file (without extension, case sensitive): ") | |
| y = f'''python setup.py build_ext --inplace | |
| python {main}.py''' | |
| with open("setup.py","w") as f: | |
| f.write(x) | |
| f.close() | |
| with open("dev.bat","w") as f: | |
| f.write(y) | |
| f.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment