python
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| python [2015/01/01 15:58] – [xdress install] donghee | python [2018/07/18 14:10] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 129: | Line 129: | ||
| < | < | ||
| wget http:// | wget http:// | ||
| + | #wget http:// | ||
| tar xvfz clang+llvm-3.4.2-x86_64-apple-darwin10.9.xz | tar xvfz clang+llvm-3.4.2-x86_64-apple-darwin10.9.xz | ||
| Line 139: | Line 140: | ||
| cd xdress | cd xdress | ||
| - | python setup.py build_ext | + | python setup.py build_ext |
| sudo python setup.py install | sudo python setup.py install | ||
| </ | </ | ||
| Line 145: | Line 146: | ||
| + | < | ||
| + | xdress --debug -p clang | ||
| + | |||
| + | </ | ||
| ---- | ---- | ||
| ===== xdress 사용하기 ===== | ===== xdress 사용하기 ===== | ||
| Line 172: | Line 177: | ||
| int i = 1; | int i = 1; | ||
| double val = a; | double val = a; | ||
| - | while (i < n){val *= a;}; | + | while (i < n){val *= a; i++;}; |
| return val; | return val; | ||
| }; | }; | ||
| Line 190: | Line 195: | ||
| </ | </ | ||
| + | jeh_setup.py | ||
| < | < | ||
| - | xdress --rc jeh_xdressrc.py | + | import os |
| - | python3 | + | from distutils.core import setup |
| + | from distutils.extension import Extension | ||
| + | from Cython.Distutils import build_ext | ||
| + | |||
| + | import numpy as np | ||
| + | |||
| + | cwd = os.getcwd() | ||
| + | incdirs = [cwd, os.path.join(cwd, | ||
| + | |||
| + | ext_modules = [ | ||
| + | Extension(" | ||
| + | include_dirs=incdirs, | ||
| + | ] | ||
| + | |||
| + | setup( | ||
| + | name = ' | ||
| + | cmdclass = {' | ||
| + | ext_modules = ext_modules, | ||
| + | packages = [' | ||
| + | ) | ||
| + | </ | ||
| + | |||
| + | Makefile | ||
| + | |||
| + | < | ||
| + | all: | ||
| + | | ||
| + | | ||
| + | clean: | ||
| + | rm -rf build | ||
| + | rm -rf jehbuild | ||
| + | | ||
| </ | </ | ||
| Line 205: | Line 242: | ||
| a.power(42) | a.power(42) | ||
| </ | </ | ||
| - | |||
python.1420127927.txt.gz · Last modified: 2018/07/18 14:09 (external edit)