py转pyd
This commit is contained in:
parent
69e5b66034
commit
21eed02866
11 changed files with 3241 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding//ActiveX\u7A97\u53E3/AxWidget.py=utf-8
|
encoding//ActiveX\u7A97\u53E3/AxWidget.py=utf-8
|
||||||
|
encoding//C\u548CC++\u6269\u5C55/py\u8F6Cpyd/pydmod.py=utf-8
|
||||||
encoding//Json\u751F\u6210QTreeWidget/Json\u751F\u6210\u6811\u5F62\u7ED3\u6784.py=utf-8
|
encoding//Json\u751F\u6210QTreeWidget/Json\u751F\u6210\u6811\u5F62\u7ED3\u6784.py=utf-8
|
||||||
encoding//PyQtChart\u7EC3\u4E60/ChartView/ChartView.py=utf-8
|
encoding//PyQtChart\u7EC3\u4E60/ChartView/ChartView.py=utf-8
|
||||||
encoding//PyQtChart\u7EC3\u4E60/ChartView/ChatWidget.py=utf-8
|
encoding//PyQtChart\u7EC3\u4E60/ChartView/ChatWidget.py=utf-8
|
||||||
|
|
7
C和C++扩展/py转pyd/build.bat
Normal file
7
C和C++扩展/py转pyd/build.bat
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
cd %~dp0
|
||||||
|
|
||||||
|
python setup.py build
|
||||||
|
|
||||||
|
python test.py
|
||||||
|
|
||||||
|
pause
|
BIN
C和C++扩展/py转pyd/build/lib.win32-3.5/pydmod.cp35-win32.pyd
Normal file
BIN
C和C++扩展/py转pyd/build/lib.win32-3.5/pydmod.cp35-win32.pyd
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
C和C++扩展/py转pyd/build/temp.win32-3.5/Release/pydmod.obj
Normal file
BIN
C和C++扩展/py转pyd/build/temp.win32-3.5/Release/pydmod.obj
Normal file
Binary file not shown.
3197
C和C++扩展/py转pyd/pydmod.c
Normal file
3197
C和C++扩展/py转pyd/pydmod.c
Normal file
File diff suppressed because it is too large
Load diff
19
C和C++扩展/py转pyd/pydmod.py
Normal file
19
C和C++扩展/py转pyd/pydmod.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Created on 2018年5月6日
|
||||||
|
# author: Irony
|
||||||
|
# site: https://github.com/892768447
|
||||||
|
# email: 892768447@qq.com
|
||||||
|
# file:
|
||||||
|
# description:
|
||||||
|
|
||||||
|
__Author__ = """By: Irony
|
||||||
|
QQ: 892768447
|
||||||
|
Email: 892768447@qq.com"""
|
||||||
|
__Copyright__ = 'Copyright (c) 2018 Irony'
|
||||||
|
__Version__ = 1.0
|
||||||
|
|
||||||
|
|
||||||
|
def sum(x, y):
|
||||||
|
return x + y
|
9
C和C++扩展/py转pyd/setup.py
Normal file
9
C和C++扩展/py转pyd/setup.py
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
from distutils.core import setup, Extension
|
||||||
|
|
||||||
|
from Cython.Distutils import build_ext
|
||||||
|
|
||||||
|
|
||||||
|
setup(
|
||||||
|
cmdclass={'build_ext': build_ext},
|
||||||
|
ext_modules=[Extension("pydmod", sources=["pydmod.py"])]
|
||||||
|
)
|
7
C和C++扩展/py转pyd/test.py
Normal file
7
C和C++扩展/py转pyd/test.py
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
import sys
|
||||||
|
sys.path.insert(0,
|
||||||
|
'./build/lib.{0}-{1}.{2}'.format(sys.platform, sys.version_info.major, sys.version_info.minor))
|
||||||
|
|
||||||
|
import pydmod
|
||||||
|
print(pydmod)
|
||||||
|
print(pydmod.sum(1, 5))
|
|
@ -37,6 +37,7 @@
|
||||||
- [1.27 QRC资源文件使用](QRC资源文件使用/)
|
- [1.27 QRC资源文件使用](QRC资源文件使用/)
|
||||||
- [1.28 C和C++扩展](C和C++扩展/)
|
- [1.28 C和C++扩展](C和C++扩展/)
|
||||||
- [1.28.1 pyx和c++](C和C++扩展/pyx和c++/)
|
- [1.28.1 pyx和c++](C和C++扩展/pyx和c++/)
|
||||||
|
- [1.28.2 py转pyd](C和C++扩展/py转pyd/)
|
||||||
|
|
||||||
|
|
||||||
### [2.QGraphicsView练习](QGraphicsView练习/)
|
### [2.QGraphicsView练习](QGraphicsView练习/)
|
||||||
|
|
Loading…
Reference in a new issue