rpms/python-cvxopt/devel import.log, NONE, 1.1 python-cvxopt-1.1-use-system-suitesparse.diff, NONE, 1.1 python-cvxopt-fixglpkinclude.patch, NONE, 1.1 python-cvxopt.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Conrad Meyer konradm at fedoraproject.org
Sun Jan 4 03:39:55 UTC 2009


Author: konradm

Update of /cvs/pkgs/rpms/python-cvxopt/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24299/devel

Modified Files:
	.cvsignore sources 
Added Files:
	import.log python-cvxopt-1.1-use-system-suitesparse.diff 
	python-cvxopt-fixglpkinclude.patch python-cvxopt.spec 
Log Message:
Import.



--- NEW FILE import.log ---
python-cvxopt-1_1-4_fc9:HEAD:python-cvxopt-1.1-4.fc9.src.rpm:1231040084

python-cvxopt-1.1-use-system-suitesparse.diff:

--- NEW FILE python-cvxopt-1.1-use-system-suitesparse.diff ---
--- src/setup.py.orig	2008-12-08 23:49:39.000000000 -0800
+++ src/setup.py	2008-12-08 23:51:02.000000000 -0800
@@ -100,55 +100,32 @@
     library_dirs = [ ATLAS_LIB_DIR ],
     define_macros = MACROS,
     sources = ['C/lapack.c'] )
 
 umfpack = Extension('umfpack', 
-    include_dirs = [ 'C/SuiteSparse/UMFPACK/Include',
-        'C/SuiteSparse/AMD/Include', 'C/SuiteSparse/AMD/Source', 
-        'C/SuiteSparse/UFconfig' ],
+    include_dirs = [ '/usr/include/suitesparse' ],
     library_dirs = [ ATLAS_LIB_DIR ],
     define_macros = MACROS,
-    libraries = [ 'blas', 'lapack'],
-    sources = [ 'C/umfpack.c',
-        'C/SuiteSparse/UMFPACK/Source/umfpack_global.c',
-        'C/SuiteSparse/UMFPACK/Source/umfpack_tictoc.c' ] +
-        ['C/SuiteSparse_cvxopt_extra/umfpack/' + s for s in
-            listdir('C/SuiteSparse_cvxopt_extra/umfpack')])
+    libraries = [ 'blas', 'lapack', 'umfpack' ],
+    sources = [ 'C/umfpack.c' ])
 
 # Build for int or long? 
 import sys
 if sys.maxint > 2**31: MACROS += [('DLONG','')]
 
 cholmod = Extension('cholmod',
     library_dirs = [ ATLAS_LIB_DIR ],
-    libraries = ['lapack', 'blas'],
-    include_dirs = [ 'C/SuiteSparse/CHOLMOD/Include', 
-        'C/SuiteSparse/COLAMD', 'C/SuiteSparse/AMD/Include', 
-        'C/SuiteSparse/UFconfig', 'C/SuiteSparse/COLAMD/Include' ],
+    libraries = ['lapack', 'blas', 'cholmod' ],
+    include_dirs = [ '/usr/include/suitesparse' ],
     define_macros = MACROS + [('NPARTITION', '1')],
-    sources = [ 'C/cholmod.c' ] +
-        ['C/SuiteSparse/AMD/Source/' + s for s in ['amd_global.c',
-            'amd_postorder.c', 'amd_post_tree.c', 'amd_2.c']] +
-        ['C/SuiteSparse/COLAMD/Source/' + s for s in ['colamd.c',
-            'colamd_global.c']] +
-        ['C/SuiteSparse/CHOLMOD/Core/' + s for s in
-            listdir('C/SuiteSparse/CHOLMOD/Core') if s[-2:] == '.c' and
-            s[0] == 'c'] +
-        ['C/SuiteSparse/CHOLMOD/Cholesky/' + s for s in
-            listdir('C/SuiteSparse/CHOLMOD/Cholesky') if s[-2:] == '.c'
-            and s[0] == 'c'] +
-        ['C/SuiteSparse/CHOLMOD/Check/cholmod_check.c'] +
-        ['C/SuiteSparse/CHOLMOD/Supernodal/' + s for s in
-            listdir('C/SuiteSparse/CHOLMOD/Supernodal') if 
-            s[-2:] == '.c' and s[0] == 'c'] )
+    sources = [ 'C/cholmod.c' ])
 
 amd = Extension('amd', 
-    include_dirs = [ 'C/SuiteSparse/AMD/Include', 
-        'C/SuiteSparse/UFconfig' ],
+    include_dirs = [ '/usr/include/suitesparse' ],
     define_macros = MACROS,
-    sources = [ 'C/amd.c' ] + [ 'C/SuiteSparse/AMD/Source/' + s for s in
-        listdir('C/SuiteSparse/AMD/Source') if s[-2:] == '.c' ])
+    libraries = [ 'amd' ],
+    sources = [ 'C/amd.c' ])
 
 misc_solvers = Extension('misc_solvers', libraries = ['lapack', 'blas'],
     library_dirs = [ ATLAS_LIB_DIR ],
     define_macros = MACROS,
     sources = ['C/misc_solvers.c'] )

python-cvxopt-fixglpkinclude.patch:

--- NEW FILE python-cvxopt-fixglpkinclude.patch ---
--- src/C/glpk.c.orig	2008-10-13 00:39:55.000000000 -0700
+++ src/C/glpk.c	2008-10-13 00:40:17.000000000 -0700
@@ -17,11 +17,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "cvxopt.h"
 #include "misc.h"
-#include "glpk.h"
+#include <glpk/glpk.h>
 
 PyDoc_STRVAR(glpk__doc__,
     "Interface to the simplex algorithm in GLPK.\n\n" 
     "The GLPK control parameters have the default values listed in \n"
     "the GLPK documentation, except for 'LPX_K_PRESOL', which is set\n"


--- NEW FILE python-cvxopt.spec ---
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           python-cvxopt
Version:        1.1
Release:        4%{?dist}
Summary:        A Python Package for Convex Optimization
Group:          Development/Languages
License:        GPLv3+
URL:            http://abel.ee.ucla.edu/cvxopt
Source0:        http://abel.ee.ucla.edu/src/cvxopt-%{version}.tar.gz
# Will submit patch0 to upstream ASAP
Patch0:         python-cvxopt-fixglpkinclude.patch
Patch1:         python-cvxopt-1.1-use-system-suitesparse.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  atlas-devel
BuildRequires:  blas-devel
BuildRequires:  fftw-devel
BuildRequires:  glpk-devel
BuildRequires:  gsl-devel
BuildRequires:  python-devel
BuildRequires:  python-setuptools-devel
BuildRequires:  suitesparse-devel
BuildRequires:  tetex-tex4ht


%description
CVXOPT is a free software package for convex optimization based on
the Python programming language. Its main purpose is to make the
development of software for convex optimization applications
straightforward by building on Python's extensive standard library and
on the strengths of Python as a high-level programming language.


%package        examples
Summary:        Examples of using %{name}
Group:          Development/Languages
Requires:       %{name} = %{version}-%{release}
Requires:       python-matplotlib


%description    examples
Example use of %{name}.


%prep
%setup -q -n cvxopt-%{version}
%patch0

# Configure all optional modules (except for DSDP which isn't in Fedora)
sed -i -e "s#^ATLAS_LIB_DIR =.*#ATLAS_LIB_DIR = '%{_libdir}/atlas'#" src/setup.py
sed -i -e "s#^BUILD_GSL =.*#BUILD_GSL = 1#" src/setup.py
sed -i -e "s#^GSL_LIB_DIR =.*#GSL_LIB_DIR = '%{_libdir}'#" src/setup.py
sed -i -e "s#^BUILD_FFTW =.*#BUILD_FFTW = 1#" src/setup.py
sed -i -e "s#^FFTW_LIB_DIR =.*#FFTW_LIB_DIR = '%{_libdir}'#" src/setup.py
sed -i -e "s#^BUILD_GLPK =.*#BUILD_GLPK = 1#" src/setup.py
sed -i -e "s#^GLPK_LIB_DIR =.*#GLPK_LIB_DIR = '%{_libdir}'#" src/setup.py
sed -i -e "s#^DSDP_LIB_DIR =.*#DSDP_LIB_DIR = '%{_libdir}'#" src/setup.py

pushd doc
  make clean
  make -B html
popd

# Remove internal copy of system library
rm -rf src/C/SuiteSparse*/

cp src/setup.py{,.orig}
%patch1


%build
cd src
CFLAGS="$RPM_OPT_FLAGS" %{__python} -c 'import setuptools; execfile("setup.py")' build


%install
rm -rf $RPM_BUILD_ROOT
pushd src
  %{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root $RPM_BUILD_ROOT
popd

mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -R examples $RPM_BUILD_ROOT%{_datadir}/%{name}/

 
%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc LICENSE doc/html/
%{python_sitearch}/*egg-info
%{python_sitearch}/cvxopt

%files examples
%defattr(-,root,root,-)
%{_datadir}/%{name}


%changelog
* Mon Dec 8 2008 Conrad Meyer <konrad at tylerc.org> - 1.1-4
- Add BR on suitesparse-devel.
- Migrate examples to subpackage.

* Mon Dec 8 2008 Conrad Meyer <konrad at tylerc.org> - 1.1-3
- Remove SuiteSparse (copy of system library).

* Mon Dec 8 2008 Conrad Meyer <konrad at tylerc.org> - 1.1-2
- Move examples to datadir/name.
- Include html documentation.
- Package as a proper python egg.

* Mon Dec 8 2008 Conrad Meyer <konrad at tylerc.org> - 1.1-1
- Bump to 1.1.

* Mon Oct 13 2008 Conrad Meyer <konrad at tylerc.org> - 1.0-1
- Initial package.


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/python-cvxopt/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	28 Dec 2008 19:06:51 -0000	1.1
+++ .cvsignore	4 Jan 2009 03:39:24 -0000	1.2
@@ -0,0 +1 @@
+cvxopt-1.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/python-cvxopt/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	28 Dec 2008 19:06:51 -0000	1.1
+++ sources	4 Jan 2009 03:39:24 -0000	1.2
@@ -0,0 +1 @@
+c56def864966a4e168474bb1c00f5808  cvxopt-1.1.tar.gz




More information about the fedora-extras-commits mailing list