revert py_libtorrent renaming for python binding

This commit is contained in:
arvidn 2015-09-23 09:13:00 -07:00
parent 89e46be4ed
commit a9821216bf
7 changed files with 16 additions and 16 deletions

View File

@ -64,9 +64,15 @@ script:
- bjam --hash -j3 warnings-as-errors=on variant=$variant -l900 $toolset $target
- cd ../examples
- bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset link=shared
- cd ../bindings/python
- bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset stage_module libtorrent-link=shared
- LD_LIBRARY_PATH=. DYLD_LIBRARY_PATH=. python test.py
- cd ..
# build libtorrent separately and install it in a temporary (well known) dir
# we have to do this because on linux the name of the python module is the same
# as the main library, so we can't stage them to the same directory
- bjam --hash -j3 warnings-as-errors=on link=shared variant=$variant $toolset install location=./lib
- cd bindings/python
# here we specify the temporary lib dir as a path to look for the main library
- bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset stage_module libtorrent-link=shared dll-path=../../lib
- LD_LIBRARY_PATH=../../lib DYLD_LIBRARY_PATH=../../lib python test.py
- if [ $sim = "1" ]; then
cd ../../simulation;
bjam --hash -j2 crypto=built-in $toolset;

View File

@ -799,8 +799,7 @@ lib torrent
headers = [ path.glob-tree include/libtorrent : *.hpp ] ;
package.install install
: <install-source-root>libtorrent
<install-no-version-symlinks>on
: <install-type>LIB
:
: torrent
: $(headers)

View File

@ -114,7 +114,7 @@ build_script:
& cd %ROOT_DIRECTORY%\examples
& b2.exe --hash -j2 %compiler% variant=%variant% linkflags=%linkflags% include=%include% link=shared
& cd %ROOT_DIRECTORY%\bindings\python
& b2.exe --hash -j2 %compiler% stage_module variant=%variant% libtorrent-link=shared linkflags=%linkflags% include=%include%
& b2.exe --hash -j2 %compiler% stage_module install-dependencies=on variant=%variant% libtorrent-link=shared linkflags=%linkflags% include=%include%
& python test.py
)
- if defined sim (

View File

@ -123,7 +123,7 @@ rule my-python-extension ( name : sources * : requirements * : default-build * :
] ;
}
my-python-extension py_libtorrent
my-python-extension libtorrent
: # sources
src/module.cpp
src/big_number.cpp
@ -157,9 +157,8 @@ my-python-extension py_libtorrent
;
install stage_module
: py_libtorrent
: libtorrent
: <location>.
<install-dependencies>on
<install-type>LIB
;

View File

@ -85,7 +85,7 @@ if '--bjam' in sys.argv:
except: pass
try: os.mkdir('libtorrent')
except: pass
shutil.copyfile('py_libtorrent' + file_ext, 'build/lib/libtorrent' + file_ext)
shutil.copyfile('libtorrent' + file_ext, 'build/lib/libtorrent' + file_ext)
packages = ['libtorrent']

View File

@ -29,7 +29,7 @@ void bind_converters();
void bind_create_torrent();
void bind_error_code();
BOOST_PYTHON_MODULE(py_libtorrent)
BOOST_PYTHON_MODULE(libtorrent)
{
Py_Initialize();
PyEval_InitThreads();

View File

@ -1,10 +1,6 @@
#!/usr/bin/env python
# this name "py_libtorrent" is the name produced by the Jamfile. The setup.py
# will actually name it libtorrent for the distro. It's only called
# py_libtorrent here to be able to coexist with the main libtorrent.so on linux
# (which otherwise would have the same name in the same directory)
import py_libtorrent as lt
import libtorrent as lt
import unittest