THRIFT-3761 Add debian package for Python3

This closes #966
This commit is contained in:
Nobuaki Sukegawa 2016-03-25 09:22:16 +09:00
parent 93bbdc8127
commit f43d0ca6e5
4 changed files with 62 additions and 11 deletions

View File

@ -66,11 +66,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
python-all-dev \
python-all-dbg \
python-setuptools \
python-support \
python-twisted \
python-zope.interface \
python-pip \
python3-dev \
python3-all \
python3-all-dbg \
python3-all-dev \
python3-setuptools \
python3-pip
# Ruby dependencies

View File

@ -72,10 +72,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
python-all-dev \
python-pip \
python-setuptools \
python-support \
python-twisted \
python-zope.interface \
python3-dev \
python3-all \
python3-all-dbg \
python3-all-dev \
python3-setuptools \
python3-pip
# Ruby dependencies

44
debian/control vendored
View File

@ -3,8 +3,10 @@ Section: devel
Priority: extra
Build-Depends: debhelper (>= 9), build-essential, mono-gmcs, python-dev, ant,
mono-devel, libmono-system-web2.0-cil, erlang-base, ruby-dev | ruby1.9.1-dev, autoconf, automake,
pkg-config, libtool, bison, flex, libboost-dev | libboost1.53-dev, python-all,
python-all-dev, python-all-dbg, openjdk-6-jdk | java-sdk,
pkg-config, libtool, bison, flex, libboost-dev | libboost1.53-dev,
python-all, python-setuptools, python-all-dev, python-all-dbg,
python3-all, python3-setuptools, python3-all-dev, python3-all-dbg,
openjdk-6-jdk | java-sdk,
libboost-test-dev | libboost-test1.53-dev, libevent-dev, libssl-dev, perl (>= 5.8.0-7),
php5, php5-dev, libglib2.0-dev, qtbase5-dev, qtbase5-dev-tools
Maintainer: Thrift Developer's <dev@thrift.apache.org>
@ -13,6 +15,7 @@ Vcs-Git: https://git-wip-us.apache.org/repos/asf/thrift.git
Vcs-Browser: https://git-wip-us.apache.org/repos/asf?p=thrift.git
Standards-Version: 3.9.5
X-Python-Version: >= 2.6
X-Python3-Version: >= 3.3
Package: thrift-compiler
Architecture: any
@ -32,7 +35,7 @@ Section: python
Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-six
Recommends: python-twisted-web, python-backports.ssl-match-hostname, python-ipaddress
Provides: ${python:Provides}
Description: Python bindings for Thrift
Description: Python bindings for Thrift (Python 2)
Thrift is a software framework for scalable cross-language services
development. It combines a software stack with a code generation engine to
build services that work efficiently and seamlessly.
@ -41,6 +44,8 @@ Description: Python bindings for Thrift
tool (in the thrift-compiler package) to compile your definition to Python
classes, and then the modules in this package will allow you to use those
classes in your programs.
.
This package installs the library for Python 2.
Package: python-thrift-dbg
Architecture: any
@ -57,6 +62,39 @@ Description: Python bindings for Thrift (debug version)
definition to Python classes, and then the modules in this package will allow
you to use those classes in your programs.
Package: python3-thrift
Architecture: any
Section: python
Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}, python3-six
Recommends: python3-twisted-web
Provides: ${python:Provides}
Description: Python bindings for Thrift (Python 3)
Thrift is a software framework for scalable cross-language services
development. It combines a software stack with a code generation engine to
build services that work efficiently and seamlessly.
.
This package contains the Python bindings for Thrift. You will need the thrift
tool (in the thrift-compiler package) to compile your definition to Python
classes, and then the modules in this package will allow you to use those
classes in your programs.
.
This package installs the library for Python 3.
Package: python3-thrift-dbg
Architecture: any
Section: debug
Depends: ${shlibs:Depends}, ${misc:Depends}, python3-thrift (= ${binary:Version}), python3-all-dbg
Provides: ${python:Provides}
Description: Python bindings for Thrift (debug version)
Thrift is a software framework for scalable cross-language services
development. It combines a software stack with a code generation engine to
build services that work efficiently and seamlessly.
.
This package contains the Python bindings for Thrift with debugging symbols.
You will need the thrift tool (in the thrift-compiler package) to compile your
definition to Python classes, and then the modules in this package will allow
you to use those classes in your programs.
Package: ruby-thrift
Architecture: all
Section: libs

17
debian/rules vendored
View File

@ -152,10 +152,10 @@ install-arch:
# Python
cd $(CURDIR)/lib/py && \
for py in $(PYVERS); do \
$$py setup.py install --install-layout=deb --no-compile --root=$(CURDIR)/debian/python-thrift; \
$$py-dbg setup.py install --install-layout=deb --no-compile --root=$(CURDIR)/debian/python-thrift-dbg; \
done
python2 setup.py install --install-layout=deb --no-compile --root=$(CURDIR)/debian/python-thrift && \
python2-dbg setup.py install --install-layout=deb --no-compile --root=$(CURDIR)/debian/python-thrift-dbg && \
python3 setup.py install --install-layout=deb --no-compile --root=$(CURDIR)/debian/python3-thrift && \
python3-dbg setup.py install --install-layout=deb --no-compile --root=$(CURDIR)/debian/python3-thrift-dbg
find $(CURDIR)/debian/python-thrift -name "*.py[co]" -print0 | xargs -0 rm -f
find $(CURDIR)/debian/python-thrift -name "__pycache__" -print0 | xargs -0 rm -fr
@ -165,6 +165,14 @@ install-arch:
find $(CURDIR)/debian/python-thrift-dbg -name "*.egg-info" -print0 | xargs -0 rm -rf
find $(CURDIR)/debian/python-thrift-dbg -depth -type d -empty -exec rmdir {} \;
find $(CURDIR)/debian/python3-thrift -name "*.py[co]" -print0 | xargs -0 rm -f
find $(CURDIR)/debian/python3-thrift -name "__pycache__" -print0 | xargs -0 rm -fr
find $(CURDIR)/debian/python3-thrift-dbg -name "__pycache__" -print0 | xargs -0 rm -fr
find $(CURDIR)/debian/python3-thrift-dbg -name "*.py[co]" -print0 | xargs -0 rm -f
find $(CURDIR)/debian/python3-thrift-dbg -name "*.py" -print0 | xargs -0 rm -f
find $(CURDIR)/debian/python3-thrift-dbg -name "*.egg-info" -print0 | xargs -0 rm -rf
find $(CURDIR)/debian/python3-thrift-dbg -depth -type d -empty -exec rmdir {} \;
# PHP
mkdir -p $(CURDIR)/debian/php5-thrift
cd $(CURDIR)/lib/php && \
@ -192,6 +200,7 @@ binary-common:
dh_installman
dh_link
dh_strip -ppython-thrift --dbg=python-thrift-dbg
dh_strip -ppython3-thrift --dbg=python3-thrift-dbg
dh_strip -pthrift-compiler -plibthrift0
dh_compress
dh_fixperms