Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
build: install python api using setuptools
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantin Khlebnikov <[email protected]>
  • Loading branch information
koct9i committed Oct 2, 2015
1 parent d401b64 commit 8a93ea9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 22 deletions.
14 changes: 9 additions & 5 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
Source: yandex-porto
Maintainer: Eugene Kilimchuk <[email protected]>
Build-Depends: cmake, debhelper (>= 8.0.0), bison, flex, pkg-config, autoconf, libtool, protobuf-compiler, libprotobuf-dev, g++ (>= 4:4.7) | g++-4.7, libncurses5-dev
Build-Depends:
cmake, debhelper (>= 8.0.0), pkg-config, autoconf, libtool,
protobuf-compiler, libprotobuf-dev, libncurses5-dev,
bison, flex, g++ (>= 4:4.7) | g++-4.7,
dh-python, python-all, python-setuptools,
Standards-Version: 3.9.2
X-Python-Version: >= 2.6
Homepage: https://github.com/yandex/porto
Vcs-Git: https://github.com/yandex/porto.git

Package: yandex-porto
Section: utils
Priority: extra
Architecture: amd64
Depends: ${shlibs:Depends}, logrotate
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
Description: Porto allows to run processes in containers
Requires Linux kernel version >= 3.4
.
Expand All @@ -19,7 +24,6 @@ Package: python-portopy
Section: python
Priority: optional
Architecture: all
Depends: python (>= 2.6), python-central, python-protobuf, yandex-porto (= ${binary:Version})
XS-Python-Version: >= 2.6
XB-Python-Version: >= 2.6
Depends: python-protobuf, ${python:Depends}
Suggests: yandex-porto (= ${binary:Version})
Description: Python API for porto
2 changes: 1 addition & 1 deletion debian/python-portopy.install
Original file line number Diff line number Diff line change
@@ -1 +1 @@
usr/lib/python2.7/site-packages/porto/
usr/lib/python*
6 changes: 0 additions & 6 deletions debian/python-portopy.postinst

This file was deleted.

6 changes: 0 additions & 6 deletions debian/python-portopy.prerm

This file was deleted.

1 change: 1 addition & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ override_dh_shlibdeps:
override_dh_install:
dh_install
-dh_bash-completion
dh_python2

%:
dh $@ --parallel
9 changes: 5 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ if(ENABLE_PYTHON)
DEPENDS rpc.proto
VERBATIM)
set(PYTHON_SOURCES "api/python/porto/rpc_pb2.py")
include(FindPythonInterp)
install(CODE "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/api/python
COMMAND ${PYTHON_EXECUTABLE} setup.py install
--root=\$ENV{DESTDIR}
--prefix=\${CMAKE_INSTALL_PREFIX})")
endif()

add_custom_target(version.hpp
Expand Down Expand Up @@ -104,7 +109,3 @@ install(
RUNTIME DESTINATION sbin
LIBRARY DESTINATION lib
)

install(
DIRECTORY api/python/porto/ DESTINATION lib/python2.7/site-packages/porto
)

0 comments on commit 8a93ea9

Please sign in to comment.