[med-svn] r12038 - in trunk/packages/rcsb-core-wrapper/trunk/debian: . patches
Laszlo Kajan
lkajan-guest at alioth.debian.org
Mon Aug 13 16:53:58 UTC 2012
Author: lkajan-guest
Date: 2012-08-13 16:53:57 +0000 (Mon, 13 Aug 2012)
New Revision: 12038
Added:
trunk/packages/rcsb-core-wrapper/trunk/debian/patches/setup.py.in
trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper
trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper-module
Removed:
trunk/packages/rcsb-core-wrapper/trunk/debian/patches/pythonwrapper
trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper
Modified:
trunk/packages/rcsb-core-wrapper/trunk/debian/control
trunk/packages/rcsb-core-wrapper/trunk/debian/patches/objectfiles
trunk/packages/rcsb-core-wrapper/trunk/debian/patches/series
trunk/packages/rcsb-core-wrapper/trunk/debian/rules
Log:
python module for python versions is made
Modified: trunk/packages/rcsb-core-wrapper/trunk/debian/control
===================================================================
--- trunk/packages/rcsb-core-wrapper/trunk/debian/control 2012-08-13 15:39:13 UTC (rev 12037)
+++ trunk/packages/rcsb-core-wrapper/trunk/debian/control 2012-08-13 16:53:57 UTC (rev 12038)
@@ -1,16 +1,17 @@
Source: librcsb-core-wrapper
Priority: optional
Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>,
+Uploaders:
Laszlo Kajan <lkajan at rostlab.org>
Build-Depends: debhelper (>= 7.0.50~), doxygen, graphviz, libboost-python-dev, libxerces-c-dev,
- python-all-dev, python-all-dbg
+ python-all-dev
Standards-Version: 3.9.3
Section: libs
Vcs-Svn: svn://svn.debian.org/debian-med/trunk/packages/rcsb-core-wrapper/trunk
Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/rcsb-core-wrapper/trunk/
DM-Upload-Allowed: yes
Homepage: http://sw-tools.rcsb.org/apps/CORE-WRAPPER/index.html
+X-Python-Version: >= 2.5
Package: librcsb-core-wrapper0
Architecture: any
@@ -73,18 +74,3 @@
classes for accessing data dictionaries and mmCIF format data files.
.
This library provides Python bindings for librcsb-core-wrapper.
-
-Package: python-librcsb-core-wrapper-dbg
-Architecture: any
-Section: debug
-Priority: extra
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, librcsb-core-wrapper0 (= ${binary:Version}), python-dbg
-Provides: ${python:Provides}
-Breaks: ${python:Breaks}
-Description: debugging symbols for python-librcsb-core-wrapper
- The RCSB Core Wrapper library was developed to provide an object-oriented
- application interface to information in mmCIF format. It includes several
- classes for accessing data dictionaries and mmCIF format data files.
- .
- This package contains the detached debug symbols for
- python-librcsb-core-wrapper.
Modified: trunk/packages/rcsb-core-wrapper/trunk/debian/patches/objectfiles
===================================================================
--- trunk/packages/rcsb-core-wrapper/trunk/debian/patches/objectfiles 2012-08-13 15:39:13 UTC (rev 12037)
+++ trunk/packages/rcsb-core-wrapper/trunk/debian/patches/objectfiles 2012-08-13 16:53:57 UTC (rev 12038)
@@ -167,7 +167,7 @@
UTIL_LOC = https://svn-dev.wwpdb.org/svn-rcsb/build/util
UTIL_MODULE = util
CHECKOUT_SCRIPT = checkout.sh
-@@ -66,7 +65,9 @@
+@@ -66,7 +65,24 @@
export WWPDB_XERCESC_LIB=xerces-c; \
./$(COMPILE_SCRIPT)'
@@ -175,17 +175,7 @@
+# lkajan: the reason for this is that I do not want to set prerequisites here just now, so I make it made always
+.PHONY: lib/librcsb-core-wrapper.la
+lib/librcsb-core-wrapper.la:
- + at sh -c 'cd ./$(UTIL_MODULE); \
- export PIC=-fPIC; \
- export WWPDB_PYTHON_INC=/apps/python/include/python2.5; \
-@@ -79,12 +80,28 @@
- export WWPDB_XERCESC_LIB_DIR=/apps/xerces-3.0.1/lib; \
- export WWPDB_XERCESC_LIB=xerces-c; \
- ./$(COMPILE_SCRIPT)'
-+ libtool --quiet --mode=link $(CXX) -version-info 0:0:0 -rpath /usr/lib $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o lib/librcsb-core-wrapper.la lib/*.lo
-+
-+compile_lnx_41: lib/librcsb-core-wrapper.la
-+ + at sh -c 'cd ./$(UTIL_MODULE); \
++ +sh -c '\
+ export PIC=-fPIC; \
+ export WWPDB_PYTHON_INC=/apps/python/include/python2.5; \
+ export WWPDB_PYTHON_LIB_DIR=/apps/python/lib; \
@@ -196,6 +186,18 @@
+ export WWPDB_XERCESC_INC=/apps/xerces-3.0.1/include; \
+ export WWPDB_XERCESC_LIB_DIR=/apps/xerces-3.0.1/lib; \
+ export WWPDB_XERCESC_LIB=xerces-c; \
++ ( cd ./$(UTIL_MODULE); ./$(COMPILE_SCRIPT) ); \
++ libtool --mode=link $(CXX) -version-info 0:0:0 -rpath /usr/lib $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -l$${WWPDB_XERCESC_LIB} -o lib/librcsb-core-wrapper.la lib/*.lo'
++
++compile_lnx_41: lib/librcsb-core-wrapper.la
+ + at sh -c 'cd ./$(UTIL_MODULE); \
+ export PIC=-fPIC; \
+ export WWPDB_PYTHON_INC=/apps/python/include/python2.5; \
+@@ -78,13 +94,14 @@
+ export WWPDB_XERCESC_INC=/apps/xerces-3.0.1/include; \
+ export WWPDB_XERCESC_LIB_DIR=/apps/xerces-3.0.1/lib; \
+ export WWPDB_XERCESC_LIB=xerces-c; \
+- ./$(COMPILE_SCRIPT)'
+ exit 0;'
debug:
@@ -203,7 +205,7 @@
clean_build:
@sh -c 'cd ./$(UTIL_MODULE); ./$(CLEAN_SCRIPT)'
-+ @rm -rf lib/*
++ @rm -rf lib/* lib/.??*
test: test-all
Deleted: trunk/packages/rcsb-core-wrapper/trunk/debian/patches/pythonwrapper
===================================================================
--- trunk/packages/rcsb-core-wrapper/trunk/debian/patches/pythonwrapper 2012-08-13 15:39:13 UTC (rev 12037)
+++ trunk/packages/rcsb-core-wrapper/trunk/debian/patches/pythonwrapper 2012-08-13 16:53:57 UTC (rev 12038)
@@ -1,36 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -96,6 +96,22 @@
- export WWPDB_XERCESC_LIB=xerces-c; \
- exit 0;'
-
-+# lkajan: for testing
-+.PHONY: wrapper
-+wrapper:
-+ + at sh -c 'cd ./$(UTIL_MODULE); \
-+ export PIC=-fPIC; \
-+ export WWPDB_PYTHON_INC=/usr/include/python2.7; \
-+ export WWPDB_PYTHON_LIB_DIR=/apps/python/lib; \
-+ export WWPDB_PYTHON_LIB=python2.7; \
-+ export WWPDB_BOOST_INC=/apps/boost/include/boost-1_41; \
-+ export WWPDB_BOOST_PYTHON_LIB_DIR=/apps/boost/lib; \
-+ export WWPDB_BOOST_PYTHON_LIB=boost_python-mt-py27; \
-+ export WWPDB_XERCESC_INC=/apps/xerces-3.0.1/include; \
-+ export WWPDB_XERCESC_LIB_DIR=/apps/xerces-3.0.1/lib; \
-+ export WWPDB_XERCESC_LIB=xerces-c; \
-+ ( cd ../wrapper && make OPT=-O install );'
-+
- debug:
- @sh -c 'cd ./$(UTIL_MODULE); ./$(COMPILE_SCRIPT) debug'
-
---- a/wrapper/Makefile
-+++ b/wrapper/Makefile
-@@ -140,7 +140,7 @@
- $(L_MOD_LIB): $(OBJ_FILES) $(ALL_DEP_LIBS)
- # Create module library
-
-- @cd $(OBJ_DIR); $(CCC) $(LINK_METHOD) $(EXT_LIBS_DIRS) $(OBJ_FILES) $(ALL_DEP_LIBS) $(EXT_LIBS) $(SYS_LIBS) -o ../$@
-+ cd $(OBJ_DIR); $(CCC) $(LINK_METHOD) $(EXT_LIBS_DIRS) $(OBJ_FILES) -L../../lib/.libs -lrcsb-core-wrapper $(EXT_LIBS) $(SYS_LIBS) -o ../$@
-
-
- # Rule for making object files
Modified: trunk/packages/rcsb-core-wrapper/trunk/debian/patches/series
===================================================================
--- trunk/packages/rcsb-core-wrapper/trunk/debian/patches/series 2012-08-13 15:39:13 UTC (rev 12037)
+++ trunk/packages/rcsb-core-wrapper/trunk/debian/patches/series 2012-08-13 16:53:57 UTC (rev 12038)
@@ -1,4 +1,4 @@
-wrapper
+wrapper-module
rm-duplicate-module
bash
make_pair
@@ -6,4 +6,5 @@
parallel-build
Makefile
objectfiles
-pythonwrapper
+wrapper
+setup.py.in
Added: trunk/packages/rcsb-core-wrapper/trunk/debian/patches/setup.py.in
===================================================================
--- trunk/packages/rcsb-core-wrapper/trunk/debian/patches/setup.py.in (rev 0)
+++ trunk/packages/rcsb-core-wrapper/trunk/debian/patches/setup.py.in 2012-08-13 16:53:57 UTC (rev 12038)
@@ -0,0 +1,109 @@
+--- /dev/null
++++ b/wrapper/python/setup.py.in
+@@ -0,0 +1,49 @@
++#!/usr/bin/env python
++
++from distutils import sysconfig
++from distutils.core import setup, Extension
++import os
++import platform
++import sys
++
++# lkajan: we follow the example of libtorrent-rasterbar here - thank you very much for that!
++def parse_cmd(cmdline, prefix, keep_prefix = False):
++ ret = []
++ for token in cmdline.split():
++ if token[:len(prefix)] == prefix:
++ if keep_prefix:
++ ret.append(token)
++ else:
++ ret.append(token[len(prefix):])
++ return ret
++
++config_vars = sysconfig.get_config_vars()
++if "CFLAGS" in config_vars and "-Wstrict-prototypes" in config_vars["CFLAGS"]:
++ config_vars["CFLAGS"] = config_vars["CFLAGS"].replace("-Wstrict-prototypes", " ")
++if "OPT" in config_vars and "-Wstrict-prototypes" in config_vars["OPT"]:
++ config_vars["OPT"] = config_vars["OPT"].replace("-Wstrict-prototypes", " ")
++
++source_list = os.listdir(os.path.join(os.path.dirname(__file__), "src"))
++source_list = [os.path.join("src", s) for s in source_list if s.endswith(".C")]
++
++# g++ -O -fPIC -ansi -Werror -Wall -Wno-deprecated -DHAVE_STRCASECMP -DINCL_TEMPLATE_SRC -DHAVE_PLACEMENT_NEW -I./include -I../include -I/usr/include/python2.7 -I/apps/boost/include/boost-1_41 -ftemplate-depth-128 -fno-inline -Wall -c src/TypeCodePyWrap.C -o ./obj/TypeCodePyWrap.o
++# g++ -shared -L/apps/boost/lib -L/apps/xerces-3.0.1/lib TypeCodePyWrap.o StlPyWrap.o CharPyWrap.o RcsbFilePyWrap.o ISTablePyWrap.o TableFilePyWrap.o CifFilePyWrap.o DicFilePyWrap.o DictObjFilePyWrap.o DataInfoPyWrap.o CifDataInfoPyWrap.o DictDataInfoPyWrap.o PdbMlFilePyWrap.o CorePyWrap.o -L../../lib/.libs -lrcsb-core-wrapper -lboost_python-mt-py27 -lxerces-c -lutil -lpthread -ldl -o ../lib/CorePyWrap.so
++extra_cmd = '@DEFINES@'
++
++setup( name='python-librcsb-core-wrapper',
++ version='1.000',
++ author = 'RCSB PDB Software Team',
++ author_email='sw-help at rcsb.rutgers.edu',
++ description = 'Python bindings for librcsb-core-wrapper',
++ long_description = 'Python bindings for librcsb-core-wrapper',
++ url = 'http://sw-tools.rcsb.org/apps/CORE-WRAPPER/index.html',
++ platforms = 'any',
++ license = 'RCSB PDB SOFTWARE LICENSE AGREEMENT',
++ ext_modules = [Extension('CorePyWrap',
++ sources = source_list,
++ language='c++',
++ include_dirs = ['../../include'] + parse_cmd(extra_cmd, '-I'),
++ library_dirs = ['../../lib/.libs'] + parse_cmd(extra_cmd, '-L'),
++ extra_compile_args = parse_cmd(extra_cmd, '-D', True),
++ libraries = ['rcsb-core-wrapper', 'boost_python-py%1d%1d' % ( sys.version_info[0], sys.version_info[1] )] + parse_cmd(extra_cmd, '-l'))],
++)
+--- a/wrapper/Makefile
++++ b/wrapper/Makefile
+@@ -101,11 +101,16 @@
+ .PHONY: ../etc/Makefile.platform all install export clean clean_build
+
+
+-all: install
++all: build
+
++.PHONY: build
++build: python/setup.py
+
+ install: $(M_MOD_LIB)
+
++python/setup.py: python/setup.py.in
++ sed -e 's!@C++FLAGS@!$(C++FLAGS)!g; s!@DEFINES@!$(DEFINES)!g; s!@EXT_COMP_OPT@!$(EXT_COMP_OPT)!; s!@EXT_LIBS_DIRS@!$(EXT_LIBS_DIRS)!g; s!@EXT_LIBS@!$(EXT_LIBS)!g;' < "$<" > "$@"
++ ln -sf ../src python/src
+
+ export:
+ mkdir -p $(EXPORT_DIR)
+@@ -135,6 +140,7 @@
+ @rm -f $(M_MOD_LIB)
+ @rm -f $(M_AGR_LIB)
+ @rm -f *.pyc
++ @rm -f python/setup.py
+
+
+ $(L_MOD_LIB): $(OBJ_FILES) $(ALL_DEP_LIBS)
+--- a/Makefile
++++ b/Makefile
+@@ -11,7 +11,7 @@
+ CLEAN_DOC_SCRIPT = clean_doc.sh
+ EXPORT_SCRIPT = export.sh
+
+-all: compile_lnx_41
++all: wrapper
+
+ compile:
+ @echo
+@@ -98,7 +98,7 @@
+
+ # lkajan: for testing
+ .PHONY: wrapper
+-wrapper:
++wrapper: lib/librcsb-core-wrapper.la
+ + at sh -c 'cd ./$(UTIL_MODULE); \
+ export PIC=-fPIC; \
+ export WWPDB_PYTHON_INC=/usr/include/python2.7; \
+@@ -110,7 +110,7 @@
+ export WWPDB_XERCESC_INC=/apps/xerces-3.0.1/include; \
+ export WWPDB_XERCESC_LIB_DIR=/apps/xerces-3.0.1/lib; \
+ export WWPDB_XERCESC_LIB=xerces-c; \
+- ( cd ../wrapper && make OPT=-O install );'
++ ( cd ../wrapper && make OPT=-O );'
+
+ debug:
+ @sh -c 'cd ./$(UTIL_MODULE); ./$(COMPILE_SCRIPT) debug'
Deleted: trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper
===================================================================
--- trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper 2012-08-13 15:39:13 UTC (rev 12037)
+++ trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper 2012-08-13 16:53:57 UTC (rev 12038)
@@ -1,7 +0,0 @@
---- a/local/modules.txt
-+++ b/local/modules.txt
-@@ -9,4 +9,3 @@
- svn https://svn-dev.wwpdb.org/svn-rcsb/pdbml/modules/pdbml-parser pdbml-parser Latest
- svn https://svn-dev.wwpdb.org/svn-rcsb/pdbml/modules/pdbml-parser pdbml-parser Latest
- svn https://svn-dev.wwpdb.org/svn-wwpdb/third-party/cctbx cctbx Latest
--svn https://svn-dev.wwpdb.org/svn-wwpdb/core/wrapper wrapper Latest
Copied: trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper (from rev 12036, trunk/packages/rcsb-core-wrapper/trunk/debian/patches/pythonwrapper)
===================================================================
--- trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper (rev 0)
+++ trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper 2012-08-13 16:53:57 UTC (rev 12038)
@@ -0,0 +1,36 @@
+--- a/Makefile
++++ b/Makefile
+@@ -96,6 +96,22 @@
+ export WWPDB_XERCESC_LIB=xerces-c; \
+ exit 0;'
+
++# lkajan: for testing
++.PHONY: wrapper
++wrapper:
++ + at sh -c 'cd ./$(UTIL_MODULE); \
++ export PIC=-fPIC; \
++ export WWPDB_PYTHON_INC=/usr/include/python2.7; \
++ export WWPDB_PYTHON_LIB_DIR=/apps/python/lib; \
++ export WWPDB_PYTHON_LIB=python2.7; \
++ export WWPDB_BOOST_INC=/apps/boost/include/boost-1_41; \
++ export WWPDB_BOOST_PYTHON_LIB_DIR=/apps/boost/lib; \
++ export WWPDB_BOOST_PYTHON_LIB=boost_python-mt-py27; \
++ export WWPDB_XERCESC_INC=/apps/xerces-3.0.1/include; \
++ export WWPDB_XERCESC_LIB_DIR=/apps/xerces-3.0.1/lib; \
++ export WWPDB_XERCESC_LIB=xerces-c; \
++ ( cd ../wrapper && make OPT=-O install );'
++
+ debug:
+ @sh -c 'cd ./$(UTIL_MODULE); ./$(COMPILE_SCRIPT) debug'
+
+--- a/wrapper/Makefile
++++ b/wrapper/Makefile
+@@ -140,7 +140,7 @@
+ $(L_MOD_LIB): $(OBJ_FILES) $(ALL_DEP_LIBS)
+ # Create module library
+
+- @cd $(OBJ_DIR); $(CCC) $(LINK_METHOD) $(EXT_LIBS_DIRS) $(OBJ_FILES) $(ALL_DEP_LIBS) $(EXT_LIBS) $(SYS_LIBS) -o ../$@
++ cd $(OBJ_DIR); $(CCC) $(LINK_METHOD) $(EXT_LIBS_DIRS) $(OBJ_FILES) -L../../lib/.libs -lrcsb-core-wrapper $(EXT_LIBS) $(SYS_LIBS) -o ../$@
+
+
+ # Rule for making object files
Copied: trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper-module (from rev 12036, trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper)
===================================================================
--- trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper-module (rev 0)
+++ trunk/packages/rcsb-core-wrapper/trunk/debian/patches/wrapper-module 2012-08-13 16:53:57 UTC (rev 12038)
@@ -0,0 +1,7 @@
+--- a/local/modules.txt
++++ b/local/modules.txt
+@@ -9,4 +9,3 @@
+ svn https://svn-dev.wwpdb.org/svn-rcsb/pdbml/modules/pdbml-parser pdbml-parser Latest
+ svn https://svn-dev.wwpdb.org/svn-rcsb/pdbml/modules/pdbml-parser pdbml-parser Latest
+ svn https://svn-dev.wwpdb.org/svn-wwpdb/third-party/cctbx cctbx Latest
+-svn https://svn-dev.wwpdb.org/svn-wwpdb/core/wrapper wrapper Latest
Modified: trunk/packages/rcsb-core-wrapper/trunk/debian/rules
===================================================================
--- trunk/packages/rcsb-core-wrapper/trunk/debian/rules 2012-08-13 15:39:13 UTC (rev 12037)
+++ trunk/packages/rcsb-core-wrapper/trunk/debian/rules 2012-08-13 16:53:57 UTC (rev 12038)
@@ -6,16 +6,39 @@
export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
-# lkajan: we borrow from libtorrent-rasterbar here (thank you)
+# lkajan: we borrow from libtorrent-rasterbar and pythonmagick here (thank you)
PYVERSIONS=$(shell pyversions -vr)
-ALLPY=$(PYVERSIONS) $(PYVERSIONS:%=%-dbg)
+# lkajan: the below could include debug versions like in python-libtorrent
+ALLPY=$(PYVERSIONS)
# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DH_VERBOSE=1
%:
- dh $@ --parallel --with python2
+ dh $@ --parallel --with python-support
+.PHONY: override_dh_auto_build
+override_dh_auto_build: override_dh_auto_build-nopy override_dh_auto_build-py
+
+.PHONY: override_dh_auto_build-nopy
+override_dh_auto_build-nopy:
+ dh_auto_build --parallel
+
+.PHONY: override_dh_auto_build-py
+override_dh_auto_build-py: override_dh_auto_build-nopy
+ dh_auto_build --parallel --sourcedirectory=wrapper/python
+
+.PHONY: override_dh_auto_install
+override_dh_auto_install: override_dh_auto_install-nopy override_dh_auto_install-py
+
+.PHONY: override_dh_auto_install-nopy
+# lkajan: TODO, use dh_install
+override_dh_auto_install-nopy:
+
+.PHONY: override_dh_auto_install-py
+override_dh_auto_install-py:
+ dh_auto_install --sourcedirectory=wrapper/python
+
.PHONY: override_dh_strip
override_dh_strip:
dh_strip --dbg-package=librcsb-core-wrapper0-dbg
@@ -30,6 +53,5 @@
.PHONY: override_dh_auto_clean
override_dh_auto_clean:
- rm -rf build build-py*
dh_auto_clean
-
+ rm -rf wrapper/python/build
More information about the debian-med-commit
mailing list