Hello community,
here is the log from the commit of package python-gammu
checked in at Tue Dec 18 18:54:58 CET 2007.
--------
--- python-gammu/python-gammu.changes 2007-11-08 10:58:18.000000000 +0100
+++ /mounts/work_src_done/STABLE/python-gammu/python-gammu.changes 2007-12-18 12:08:43.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Dec 18 12:08:30 CET 2007 - prusnak@suse.cz
+
+- updated to 0.24
+ * Compatibility with current gammu.
+ * Improved MinGW crosscompilation instructions.
+
+-------------------------------------------------------------------
Old:
----
python-gammu-0.23.tar.bz2
New:
----
python-gammu-0.24.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-gammu.spec ++++++
--- /var/tmp/diff_new_pack.W29742/_old 2007-12-18 18:54:30.000000000 +0100
+++ /var/tmp/diff_new_pack.W29742/_new 2007-12-18 18:54:30.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package python-gammu (Version 0.23)
+# spec file for package python-gammu (Version 0.24)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,9 +11,9 @@
# norootforbuild
Name: python-gammu
-BuildRequires: gammu-devel >= 1.13.97
+BuildRequires: gammu-devel >= 1.14.90
BuildRequires: python-devel
-Version: 0.23
+Version: 0.24
Release: 1
Requires: python-gammu python-wxGTK
AutoReqProv: on
@@ -51,7 +51,12 @@
%files -f INSTALLED_FILES
%defattr(-,root,root)
%doc AUTHORS COPYING README NEWS examples
+
%changelog
+* Tue Dec 18 2007 - prusnak@suse.cz
+- updated to 0.24
+ * Compatibility with current gammu.
+ * Improved MinGW crosscompilation instructions.
* Thu Nov 08 2007 - prusnak@suse.cz
- update to 0.23
* compatibility with current gammu
++++++ python-gammu-0.23.tar.bz2 -> python-gammu-0.24.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.23/errors.c new/python-gammu-0.24/errors.c
--- old/python-gammu-0.23/errors.c 2007-11-01 03:21:53.000000000 +0100
+++ new/python-gammu-0.24/errors.c 2007-11-14 03:16:51.000000000 +0100
@@ -81,6 +81,7 @@
PyObject *PyERR_WRITING_FILE;
PyObject *PyERR_NONE_SECTION;
PyObject *PyERR_USING_DEFAULTS;
+PyObject *PyERR_CORRUPTED;
PyObject *PyERR_LAST_VALUE;
int checkError(GSM_StateMachine *s, GSM_Error error, char *where) {
@@ -149,6 +150,7 @@
case ERR_WRITING_FILE: err = PyERR_WRITING_FILE; break;
case ERR_NONE_SECTION: err = PyERR_NONE_SECTION; break;
case ERR_USING_DEFAULTS: err = PyERR_USING_DEFAULTS; break;
+ case ERR_CORRUPTED: err = PyERR_CORRUPTED; break;
case ERR_LAST_VALUE: err = PyERR_LAST_VALUE; break;
}
@@ -293,6 +295,7 @@
CREATE_ERROR(ERR_WRITING_FILE)
CREATE_ERROR(ERR_NONE_SECTION)
CREATE_ERROR(ERR_USING_DEFAULTS)
+ CREATE_ERROR(ERR_CORRUPTED)
CREATE_ERROR(ERR_LAST_VALUE)
PyDict_SetItemString(d, "Errors", error_list);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.23/gammu/Data.py new/python-gammu-0.24/gammu/Data.py
--- old/python-gammu-0.23/gammu/Data.py 2007-08-06 06:43:15.000000000 +0200
+++ new/python-gammu-0.24/gammu/Data.py 2007-11-14 03:15:10.000000000 +0100
@@ -33,26 +33,31 @@
import sys
Connections = [
+ 'at',
'at19200',
'at115200',
'fbus',
'fbusirda',
'fbusdlr3',
'fbusdku5',
+ 'dku2phonet',
+ 'dku5fbus2',
+ 'fbuspl2303',
'mbus',
'irdaphonet',
'irdaat',
'irdaobex',
- 'dku2phonet',
- 'dku5fbus2',
+ 'irdagnapbus',
'bluerffbus',
'bluerfphonet',
'bluephonet',
- 'bluerfat',
'blueat',
+ 'bluerfat',
+ 'blueobex',
+ 'bluerfobex',
'phonetblue',
'fbusblue',
- 'fbuspl2303',
+ 'bluerfgnapbus',
]
MemoryValueTypes = [
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.23/INSTALL new/python-gammu-0.24/INSTALL
--- old/python-gammu-0.23/INSTALL 2007-09-26 06:09:40.000000000 +0200
+++ new/python-gammu-0.24/INSTALL 2007-11-30 08:08:14.000000000 +0100
@@ -17,11 +17,12 @@
3. Configure (you might want to tweak configure parameters):
> cd gammu-*
> ./configure --prefix=/usr
- Optionally you can make it shared library with --enable-shared t
+ Optionally you can make it shared library with --enable-shared to
+ produce shared library.
4. Build:
> make
5. Install:
- > sdo make install
+ > sudo make install
* Pkg-config *
@@ -45,27 +46,29 @@
can pass path common directory in gammu sources as path to includes and
library:
-python setup.py build \
+python setup.py build_ext \
--gammu-libs=path_to_gammu_library \
- --gammu-incs=path_to_gammu_includes
+ --gammu-incs=path_to_gammu_includes \
+ build
Alternatively you can point setup.py to location where you built gammu:
-python setup.py build \
- --gammu-build=path_to_gammu_build_directory
+python setup.py build_ext \
+ --gammu-build=path_to_gammu_build_directory \
+ build
See "python setup.py build --help" for more options.
When running install later, you will probably need to add --skip-deps in
-this case.
+this case, eg:
+python setup.py build_ext --skip-deps \
+ install
Windows systems
---------------
Current known working way to make static gammu library and then use it.
-Files for static gammu build are placed in win32/STATIC/ directory in
-gammu sources.
When you have the library, you need to point build system to right
location. As pkg-config is not well supported on Windows, you have to
@@ -76,4 +79,42 @@
Alternatively there are be prebuilt modules on python-gammu web site.
+Cross compilation for Windows on Linux
+--------------------------------------
+
+To build windows python extensions, preferred way is to use windows
+Python running with Wine making it invoke MinGW tool chain compiled for
+Linux. This way distutils believe it can use the Cygwin/MinGW32
+compiler (-mno-cygwin) without patching.
+
+So, install Wine and install Python on Wine:
+
+msiexec /i python-2.5.1.msi
+
+Launch MakeFakeWin.sh at the top of your python-gammu source tree,
+giving it MinGW tool chain name (if gcc is called i586-mingw32msvc-gcc,
+pass i586-mingw32msvc):
+
+./MakeFakeWin.sh i586-mingw32msvc
+
+Now gcc.exe, g++.exe, dllwrap.exe, dlltool.exe and wx-config.exe
+have been created in CWD. These are links to a real windows executable
+(wine_linux_launcher.exe) that call the locally created
+wine_linux_launcher.sh script, with executable name + all invocation
+arguments as parameters, and wait for result files for both return value
+and standard output be created and finally pass result back to calling
+application, i.e. python.exe, in the Windows way... To summary, it let
+distutils do os.popen and os.spawn as expected.
+
+wine c:\\python25\\python setup.py build_ext \
+ --gammu-libs=../gammu/build-win/common \
+ --gammu-incs=../gammu/build-win/include/ \
+ -c mingw32 \
+ build bdist_wininst
+
+If wine complains about COMSPEC environment variable use
+export COMSPEC=cmd.
+
+Now you have in dist directory installer for python-gammu for Windows.
+
# vim: et ts=4 sw=4 sts=4 tw=72 spell spelllang=en_us
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.23/MakeFakeWin.sh new/python-gammu-0.24/MakeFakeWin.sh
--- old/python-gammu-0.23/MakeFakeWin.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/python-gammu-0.24/MakeFakeWin.sh 2007-11-30 08:08:14.000000000 +0100
@@ -0,0 +1,90 @@
+#!/bin/bash
+
+cat > wine_linux_launcher.c <
+#include
+#include
+
+#define PACKET_SZ 32
+int main(int argc,char *const argv[])
+{
+ int found=0;
+ FILE *res_stream;
+ FILE *stream;
+ char list[PACKET_SZ];
+ char stdoutfile[1024] = "";
+ char returnfile[1024] = "";
+ char cmd[4096] = "";
+ int i, numread, numwritten;
+ sprintf(cmd, "wine_linux_launcher.sh %s ", argv[0]);
+ for(i=1; i wine_linux_launcher.sh <>> '\$exename
+shift
+case \$bzname in
+ gcc|g++|dllwrap|windres)
+ for j in "\$@"; do
+ if [ "\$j" == "--output-lib" ];then
+ bzname=dllwrap
+ fi
+ if [ "\`echo \$j | head -c2\`" = "-I" -a "\`echo \$j |head -c4 |tail -c1\`" = ":" ]; then
+ badpath=\`echo \$j | sed 's/^-I//'\`
+ res=\$res\ "-I\`winepath \$badpath\`"
+ elif [ "\`echo \$j | head -c2\`" = "-L" -a "\`echo \$j |head -c4 |tail -c1\`" = ":" ]; then
+ badpath=\`echo \$j | sed 's/^-L//'\`
+ res=\$res\ "-L\`winepath \$badpath\`"
+ elif [ "\`echo \$j | head -c5\`" = "-lwx_" ]; then
+ res=\$res\ \${j}.dll
+ else
+ res=\$res\ "\`echo \$j|tr '\\' '/'\`"
+ fi
+ done
+ echo '>>> $1-'\$bzname \$res
+ $1-\$bzname \$res > \${exename}_stdout
+ ;;
+ wx-config)
+ /opt/wx/2.8/bin/wx-config "\$@" > \${exename}_stdout
+ ;;
+esac
+echo \$? > \${exename}_return
+EOF
+chmod +x wine_linux_launcher.sh
+
+for i in gcc g++ dllwrap windres wx-config; do
+ln -sf wine_linux_launcher.exe $i.exe
+done
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.23/mingw-cross/Core.def new/python-gammu-0.24/mingw-cross/Core.def
--- old/python-gammu-0.23/mingw-cross/Core.def 2007-05-13 20:37:48.000000000 +0200
+++ new/python-gammu-0.24/mingw-cross/Core.def 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-LIBRARY Core.pyd
-EXPORTS
- initCore
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.23/mingw-cross/lib2def.py new/python-gammu-0.24/mingw-cross/lib2def.py
--- old/python-gammu-0.23/mingw-cross/lib2def.py 2007-02-06 14:22:46.000000000 +0100
+++ new/python-gammu-0.24/mingw-cross/lib2def.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,120 +0,0 @@
-#! /usr/bin/env python
-import re
-import sys
-import os
-import string
-
-PYVER=os.environ.get('PYVER','%s%s'%sys.version_info[0:2])
-DEFAULT_NM = os.environ.get('NM','nm') + ' -Cs'
-
-__doc__ = """This module generates a DEF file from the symbols in
-an MSVC-compiled DLL import library. It correctly discriminates between
-data and functions. The data is collected from the output of the program
-nm(1).
-
-Usage:
- python lib2def.py [libname.lib] [output.def]
-or
- python lib2def.py [libname.lib] > output.def
-
-libname.lib defaults to python%s.lib and output.def defaults to stdout
-
-Relevant environment variables:
- PYVER Force the python version (ex: PYVER=23)
- NM Force the nm executable (ex: NM=i586-mingw32msvc-nm)
-
-Author: Robert Kern
-Last Update: April 30, 1999
-
-Modified on 2003-08-23 to allow python version and nm to be changed.
-by Matthew Mueller <donut AT dakotacom DOT net>
-"""%PYVER
-
-__version__ = '0.1a-1'
-
-DEF_HEADER = """LIBRARY Python%s.dll
-;CODE PRELOAD MOVEABLE DISCARDABLE
-;DATA PRELOAD SINGLE
-
-EXPORTS
-"""%PYVER
-# the header of the DEF file
-
-FUNC_RE = re.compile(r"^(.*) in python%s\.dll"%PYVER, re.MULTILINE)
-DATA_RE = re.compile(r"^_imp__(.*) in python%s\.dll"%PYVER, re.MULTILINE)
-
-def parse_cmd():
- """Parses the command-line arguments.
-
-libfile, deffile = parse_cmd()"""
- if len(sys.argv) == 3:
- if sys.argv[1][-4:] == '.lib' and sys.argv[2][-4:] == '.def':
- libfile, deffile = sys.argv[1:]
- elif sys.argv[1][-4:] == '.def' and sys.argv[2][-4:] == '.lib':
- deffile, libfile = sys.argv[1:]
- else:
- print "I'm assuming that your first argument is the library\nand the second is the DEF file."
- elif len(sys.argv) == 2:
- if sys.argv[1][-4:] == '.def':
- deffile = sys.argv[1]
- libfile = 'python%s.lib'%PYVER
- elif sys.argv[1][-4:] == '.lib':
- deffile = None
- libfile = sys.argv[1]
- else:
- libfile = 'python%s.lib'%PYVER
- deffile = None
- return libfile, deffile
-
-def getnm(nm_cmd = 'nm -Cs python%s.lib'%PYVER):
- """Returns the output of nm_cmd via a pipe.
-
-nm_output = getnam(nm_cmd = 'nm -Cs py_lib')"""
- f = os.popen(nm_cmd)
- nm_output = f.read()
- f.close()
- return nm_output
-
-def parse_nm(nm_output):
- """Returns a tuple of lists: dlist for the list of data
-symbols and flist for the list of function symbols.
-
-dlist, flist = parse_nm(nm_output)"""
- data = DATA_RE.findall(nm_output)
- func = FUNC_RE.findall(nm_output)
-
- flist = []
- for sym in data:
- if sym in func and (sym[:2] == 'Py' or sym[:3] == '_Py' or sym[:4] == 'init'):
- flist.append(sym)
-
- dlist = []
- for sym in data:
- if sym not in flist and (sym[:2] == 'Py' or sym[:3] == '_Py'):
- dlist.append(sym)
-
- dlist.sort()
- flist.sort()
- return dlist, flist
-
-def output_def(dlist, flist, header, file = sys.stdout):
- """Outputs the final DEF file to a file defaulting to stdout.
-
-output_def(dlist, flist, header, file = sys.stdout)"""
- for data_sym in dlist:
- header = header + '\t%s DATA\n' % data_sym
- header = header + '\n' # blank line
- for func_sym in flist:
- header = header + '\t%s\n' % func_sym
- file.write(header)
-
-if __name__ == '__main__':
- libfile, deffile = parse_cmd()
- if deffile == None:
- deffile = sys.stdout
- else:
- deffile = open(deffile, 'w')
- nm_cmd = '%s %s' % (DEFAULT_NM, libfile)
- nm_output = getnm(nm_cmd)
- dlist, flist = parse_nm(nm_output)
- output_def(dlist, flist, DEF_HEADER, deffile)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.23/mingw-cross/Makefile new/python-gammu-0.24/mingw-cross/Makefile
--- old/python-gammu-0.23/mingw-cross/Makefile 2007-06-16 21:12:11.000000000 +0200
+++ new/python-gammu-0.24/mingw-cross/Makefile 1970-01-01 01:00:00.000000000 +0100
@@ -1,81 +0,0 @@
-# Python version
-PYVER=25
-
-# Paths to various needed libraries/tools
-PYDIR=/home/michal/.wine/drive_c/Python$(PYVER)/
-GAMMUDIR=/home/michal/work/gammu/gammu/build-mingw/
-MINGWDIR=/usr/lib/gcc/i586-mingw32msvc/3.4.5/
-GETTEXTDIR=/home/michal/work/win-cross/gettext/
-
-# Program names
-CC=i586-mingw32msvc-gcc
-LD=i586-mingw32msvc-ld
-NM=i586-mingw32msvc-nm
-DLLWRAP=i586-mingw32msvc-dllwrap
-DLLTOOL=i586-mingw32msvc-dlltool
-
-INCLUDES=-I$(PYDIR)/include -I./ -I../ -I$(GAMMUDIR)/include
-MINGWLD=-L$(MINGWDIR) -L$(MINGWDIR)/../../../../i586-mingw32msvc/lib
-LDFLAGS=$(MINGWLD) -L$(PYDIR)/libs -L$(GAMMUDIR)/common -L$(GETTEXTDIR)/lib -lGammu -lws2_32 -lsetupapi -ladvapi32 -lintl -lmsvcrt -lkernel32 -lshell32 -lmoldname -lmingwex -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname -lmingwex
-LIBS=-lpython$(PYVER)
-CFLAGS=-fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes $(INCLUDES)
-LIB2DEF=./lib2def.py
-
-LIBPY_DEF=$(PYDIR)/libs/libpython$(PYVER).def
-LIBPY_A=$(PYDIR)/libs/libpython$(PYVER).a
-
-MODULE=Core
-INPUT=\
- errors.o \
- misc.o \
- convertors/misc.o \
- convertors/string.o \
- convertors/time.o \
- convertors/base.o \
- convertors/sms.o \
- convertors/memory.o \
- convertors/todo.o \
- convertors/calendar.o \
- convertors/bitmap.o \
- convertors/ringtone.o \
- convertors/backup.o \
- convertors/file.o \
- convertors/call.o \
- convertors/wap.o \
- gammu.o
-#OUTPUT=$(PYDIR)/Lib/site-packages/$(MODULE).pyd
-OUTPUT=$(MODULE).pyd
-MODULE_DEF=$(MODULE).def
-
-all: $(OUTPUT)
-
-$(LIBPY_DEF): $(PYDIR)/libs/python$(PYVER).lib
- NM=$(NM) PYVER=$(PYVER) $(LIB2DEF) $^ $@
-
-$(LIBPY_A): $(LIBPY_DEF)
- $(DLLTOOL) --dllname python$(PYVER).dll --def $^ --output-lib $@
-
-$(OUTPUT): $(INPUT) $(LIBPY_A) $(MODULE_DEF) libmsvcrt.a
- @#$(DLLWRAP) -L --dllname $(MODULE).pyd --driver-name $(CC) --def $(MODULE_DEF) -o $@ $(INPUT) -s --entry _DllMain@12 --target=i586-mingw32 $(LDFLAGS) $(LIBS)
- $(LD) --dll -o $@ $(MODULE_DEF) $(INPUT) -s --entry _DllMain@12 $(LDFLAGS) $(LIBS)
-
-libmsvcrt.a: /usr/i586-mingw32msvc/lib/libmsvcr71.a
- cp /usr/i586-mingw32msvc/lib/libmsvcr71.a libmsvcrt.a
-
-convertors/%.o: ../convertors/%.c pyg-config.h convertors
- $(CC) $(CFLAGS) -c $< -o $@
-
-%.o: ../%.c pyg-config.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-convertors:
- mkdir convertors
-
-pyg-config.h: ../setup.py
- ../setup.py --dump-config > pyg-config.h
-
-clean:
- rm -rf convertors
- rm -f pyg-config.h
- rm -f $(INPUT)
- rm -f $(OUTPUT)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.23/NEWS new/python-gammu-0.24/NEWS
--- old/python-gammu-0.23/NEWS 2007-11-08 05:07:41.000000000 +0100
+++ new/python-gammu-0.24/NEWS 2007-12-16 15:04:13.000000000 +0100
@@ -4,6 +4,12 @@
Major changes for each release are described here. Detailed changes between
two versions can be retrieved from Subversion.
+0.24
+==== (2007-12-16)
+
+* Compatibility with current gammu.
+* Improved MinGW crosscompilation instructions.
+
0.23
==== (2007-11-08)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.23/PKG-INFO new/python-gammu-0.24/PKG-INFO
--- old/python-gammu-0.23/PKG-INFO 2007-11-08 05:09:37.000000000 +0100
+++ new/python-gammu-0.24/PKG-INFO 2007-12-16 15:12:04.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: python-gammu
-Version: 0.23
+Version: 0.24
Summary: Gammu bindings
Home-page: http://cihar.com/gammu/python
Author: Michal Čihař
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.23/python-gammu.spec new/python-gammu-0.24/python-gammu.spec
--- old/python-gammu-0.23/python-gammu.spec 2007-11-01 03:21:53.000000000 +0100
+++ new/python-gammu-0.24/python-gammu.spec 2007-11-27 07:01:39.000000000 +0100
@@ -1,28 +1,25 @@
%define name python-gammu
-%define version 0.20
-%define release 1
+%define version 0.24
+%define rel 1
+%define extension bz2
Summary: Python module to communicate with mobile phones
Name: %{name}
Version: %{version}
-Release: %{release}
-Source0: %{name}-%{version}.tar.bz2
+Release: %{rel}
+Source0: %{name}-%{version}.tar.%{extension}
License: GPL
-%if %_vendor == "suse"
+%if 0%{?suse_version}
Group: Hardware/Mobile
%else
Group: Applications/Communications
%endif
Packager: Michal Cihar
Vendor: Michal Cihar
-BuildRequires: gammu-devel >= 1.13.97
+BuildRequires: gammu-devel >= 1.14.90 python-devel
Url: http://cihar.com/gammu/wammu
Buildroot: %{_tmppath}/%name-%version-root
-%if %{_vendor} != redhat
-%py_requires -d
-%else
Requires: python
-%endif
%description
This provides gammu module, that can work with any phone Gammu
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.23/setup.py new/python-gammu-0.24/setup.py
--- old/python-gammu-0.23/setup.py 2007-11-01 03:21:53.000000000 +0100
+++ new/python-gammu-0.24/setup.py 2007-11-16 10:20:45.000000000 +0100
@@ -39,12 +39,9 @@
import datetime
import string
-# detect whether we should check for dependencies
-skip_dependencies = False
-
# some defines
MAJOR_VERSION = 0
-MINOR_VERSION = 23
+MINOR_VERSION = 24
EXTRA_VERSION = None
if EXTRA_VERSION == None:
@@ -52,7 +49,7 @@
else:
VERSION = '%d.%d.%d' % (MAJOR_VERSION, MINOR_VERSION, EXTRA_VERSION)
-GAMMU_REQUIRED = (1,13,97)
+GAMMU_REQUIRED = (1,14,90)
PYTHON_REQUIRED = (2,3)
ADDITIONAL_PARAMS = [
@@ -65,43 +62,6 @@
('gammu-build=', None, 'path where gammu library has been built'),
]
-class install_gammu(distutils.command.install.install, object):
- """
- Install wrapper to support option for skipping deps
- """
-
- user_options = distutils.command.install.install.user_options + [('skip-deps', 's', 'skip checking for dependencies')]
- boolean_options = distutils.command.install.install.boolean_options + ['skip-deps']
-
- def initialize_options(self):
- global skip_dependencies
- super(install_gammu, self).initialize_options()
- self.skip_deps = skip_dependencies
-
- def finalize_options(self):
- global skip_dependencies
- super(install_gammu, self).finalize_options()
- if self.skip_deps:
- skip_dependencies = self.skip_deps
-
-class build_gammu(distutils.command.build.build, object):
- """
- Custom build command to pass option to our build_ext.
- """
- user_options = distutils.command.build.build.user_options + ADDITIONAL_PARAMS
- boolean_options = distutils.command.build.build.boolean_options + ['skip-deps']
-
- def initialize_options(self):
- global skip_dependencies
- super(build_gammu, self).initialize_options()
- self.skip_deps = skip_dependencies
- self.pkgconfig = 'pkg-config'
- self.pkgconfig_search_path = None
- self.gammu_libs = None
- self.gammu_incs = None
- self.gammu_cfg = None
- self.gammu_build = None
-
class build_ext_gammu(distutils.command.build_ext.build_ext, object):
"""
Custom build_ext command with dependency checking support.
@@ -111,9 +71,8 @@
linklibs = []
def initialize_options(self):
- global skip_dependencies
super(build_ext_gammu, self).initialize_options()
- self.skip_deps = skip_dependencies
+ self.skip_deps = False
self.pkgconfig = 'pkg-config'
self.pkgconfig_search_path = None
self.gammu_libs = None
@@ -121,21 +80,6 @@
self.gammu_cfg = None
self.gammu_build = None
- def finalize_options(self):
- global skip_dependencies
- super(build_ext_gammu, self).finalize_options()
- self.set_undefined_options('build',
- ('skip_deps', 'skip_deps'),
- ('pkgconfig', 'pkgconfig'),
- ('pkgconfig_search_path', 'pkgconfig_search_path'),
- ('gammu_libs', 'gammu_libs'),
- ('gammu_incs', 'gammu_incs'),
- ('gammu_cfg', 'gammu_cfg'),
- ('gammu_build', 'gammu_build'),
- )
- if self.skip_deps:
- skip_dependencies = self.skip_deps
-
def do_pkgconfig(self, cmd):
prefix = ''
if self.pkgconfig_search_path is not None:
@@ -334,8 +278,7 @@
header.close()
def run (self):
- global skip_dependencies
- if not skip_dependencies:
+ if not self.skip_deps:
self.check_requirements()
self.write_config()
super(build_ext_gammu, self).run()
@@ -406,8 +349,6 @@
],
cmdclass = {
'build_ext': build_ext_gammu,
- 'build': build_gammu,
- 'install': install_gammu,
},
packages = ['gammu'],
ext_modules = [gammumodule]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org