Advertisement
orborbson

cython

Mar 17th, 2024 (edited)
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. plik="test"
  3. py_wer="3.10"
  4.  
  5. cat << EOF > "${plik}.pyx"
  6. #!python
  7. #cython: language_level=3
  8. print("przykładowa suma:\n%i + %i = %i" % (1, 2, 1 + 2))
  9. EOF
  10.  
  11. cython3 --embed "${plik}.pyx"; gcc "${plik}.c" -I "/usr/include/python${py_wer}/" -L "/lib/x86_64-linux-gnu/" -l "python${py_wer}" -Os -Wall -o "${plik}.out"
  12.  
  13. ./"${plik}.out"
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement