pyeventのインストール

pyeventは、libeventのラッパーです。

Ubuntu9.10にpyeventをインストールして見ます。

事前にインストールするライブラリは、python-dev,libevent,libevent-devです。

python-devインストール

shibacow@ubuntu:~$ sudo aptitude install python-dev

libevent,libevent-devのインストール

sudo aptitude install libevent libevent-dev

インストールされるlibeventのバージョンは、1.4

pyeventのインストール

shibacow@ubuntu:~/pkg$ wget "http://pyevent.googlecode.com/files/pyevent-0.3.tar.gz" #wgetでpyevent-0.3.tar.gzを取得。
shibacow@ubuntu:~/pkg$ tar zxvf pyevent-0.3.tar.gz #解凍
pyevent-0.3/
pyevent-0.3/CHANGES
pyevent-0.3/CVS/
pyevent-0.3/CVS/Entries
pyevent-0.3/CVS/Repository
pyevent-0.3/CVS/Root
pyevent-0.3/event.c
pyevent-0.3/event.pyx
pyevent-0.3/LICENSE
pyevent-0.3/Makefile
pyevent-0.3/README
pyevent-0.3/setup.py
pyevent-0.3/test.py
shibacow@ubuntu:~/pkg$ cd pyevent-0.3/
shibacow@ubuntu:~/pkg/pyevent-0.3$ sudo python setup.py install #setup.py installを実行
found system libevent for linux2
running install
running build
running build_ext
building 'event' extension
creating build
creating build/temp.linux-i686-2.6
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c event.c -o build/temp.linux-i686-2.6/event.o
event.c: In function ‘__pyx_f_5event___event_sigcb’:
event.c:140: warning: label ‘__pyx_L1’ defined but not used
...中略...
event.c:29: warning: ‘__Pyx_CreateClass’ declared ‘static’ but never defined
creating build/lib.linux-i686-2.6
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-i686-2.6/event.o -levent -o build/lib.linux-i686-2.6/event.so
running install_lib
copying build/lib.linux-i686-2.6/event.so -> /usr/local/lib/python2.6/dist-packages
running install_egg_info
Writing /usr/local/lib/python2.6/dist-packages/event-0.3.egg-info

pyeventのテストを実行

shibacow@ubuntu:~/pkg/pyevent-0.3$ python test.py
test_read
.test_read2
.test_signal
.test_signal2
.test_timeout
.test_timeout2
.
----------------------------------------------------------------------
Ran 6 tests in 12.010s

OK

トップ   差分 バックアップ リロード   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2015-02-01 (日) 14:38:23 (3371d)