[python-cvxopt] New upstream release. New project URL.

Jerry James jjames at fedoraproject.org
Tue May 28 17:24:41 UTC 2013


commit b5411c29252ddd3003152af6e4f7855819877fa9
Author: Jerry James <jamesjer at betterlinux.com>
Date:   Tue May 28 11:24:27 2013 -0600

    New upstream release.
    New project URL.

 .gitignore                |    2 +-
 python-cvxopt-setup.patch |   80 ++++++++++++++++++++++++---------------------
 python-cvxopt.spec        |   50 ++++++++++++++++------------
 sources                   |    2 +-
 4 files changed, 73 insertions(+), 61 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7c19093..f13d4dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/cvxopt-1.1.5.tar.gz
+/1.1.6.tar.gz
diff --git a/python-cvxopt-setup.patch b/python-cvxopt-setup.patch
index 1441059..7d7ee52 100644
--- a/python-cvxopt-setup.patch
+++ b/python-cvxopt-setup.patch
@@ -1,6 +1,6 @@
---- ./src/setup.py.orig	2012-03-27 14:05:13.000000000 -0600
-+++ ./src/setup.py	2012-10-10 10:57:33.820273950 -0600
-@@ -2,10 +2,10 @@ from distutils.core import setup, Extens
+--- setup.py.orig	2013-04-22 00:44:28.000000000 -0600
++++ setup.py	2013-05-28 10:28:30.956187966 -0600
+@@ -2,10 +2,10 @@
  from glob import glob
  
  # Modifiy this if BLAS and LAPACK libraries are not in /usr/lib.
@@ -13,7 +13,7 @@
  LAPACK_LIB = ['lapack']
  BLAS_EXTRA_LINK_ARGS = []
  
-@@ -15,7 +15,7 @@ BLAS_NOUNDERSCORES = False
+@@ -15,7 +15,7 @@
  
  # Set to 1 if you are using the random number generators in the GNU
  # Scientific Library.
@@ -22,7 +22,7 @@
  
  # Directory containing libgsl (used only when BUILD_GSL = 1).
  GSL_LIB_DIR = '/usr/lib'
-@@ -24,7 +24,7 @@ GSL_LIB_DIR = '/usr/lib'
+@@ -24,7 +24,7 @@
  GSL_INC_DIR = '/usr/include/gsl'
  
  # Set to 1 if you are installing the fftw module.
@@ -31,7 +31,7 @@
  
  # Directory containing libfftw3 (used only when BUILD_FFTW = 1).
  FFTW_LIB_DIR = '/usr/lib'
-@@ -33,7 +33,7 @@ FFTW_LIB_DIR = '/usr/lib'
+@@ -33,7 +33,7 @@
  FFTW_INC_DIR = '/usr/include'
  
  # Set to 1 if you are installing the glpk module.
@@ -40,7 +40,7 @@
  
  # Directory containing libglpk (used only when BUILD_GLPK = 1).
  GLPK_LIB_DIR = '/usr/lib'
-@@ -42,13 +42,13 @@ GLPK_LIB_DIR = '/usr/lib'
+@@ -42,13 +42,13 @@
  GLPK_INC_DIR = '/usr/include'
  
  # Set to 1 if you are installing the DSDP module.
@@ -56,58 +56,64 @@
  
  # No modifications should be needed below this line.
  
-@@ -112,17 +112,12 @@ lapack = Extension('lapack', libraries =
-     sources = ['C/lapack.c'] )
+@@ -112,20 +112,13 @@
+     sources = ['src/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 = [ 'src/C/SuiteSparse/UMFPACK/Include',
+-        'src/C/SuiteSparse/AMD/Include', 
+-        'src/C/SuiteSparse/AMD/Source', 
+-        'src/C/SuiteSparse/SuiteSparse_config' ],
 +    include_dirs = [ '/usr/include/suitesparse' ],
      library_dirs = [ BLAS_LIB_DIR ],
-     define_macros = MACROS,
+     define_macros = MACROS + [('NTIMER', '1'), ('NCHOLMOD', '1')],
 -    libraries = LAPACK_LIB + BLAS_LIB,
 +    libraries = LAPACK_LIB + BLAS_LIB + [ 'umfpack' ],
+     extra_compile_args = ['-Wno-unknown-pragmas'],
      extra_link_args = BLAS_EXTRA_LINK_ARGS,
--    sources = [ 'C/umfpack.c',
--        'C/SuiteSparse/UMFPACK/Source/umfpack_global.c',
--        'C/SuiteSparse/UMFPACK/Source/umfpack_tictoc.c' ] +
--        glob('C/SuiteSparse_cvxopt_extra/umfpack/*'))
-+    sources = [ 'C/umfpack.c' ])
+-    sources = [ 'src/C/umfpack.c',
+-        'src/C/SuiteSparse/UMFPACK/Source/umfpack_global.c',
+-        'src/C/SuiteSparse/UMFPACK/Source/umfpack_tictoc.c' ] +
+-        ['src/C/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c'] +
+-        glob('src/C/SuiteSparse_cvxopt_extra/umfpack/*'))
++    sources = [ 'src/C/umfpack.c' ])
  
  # Build for int or long? 
  import sys
-@@ -130,27 +125,17 @@ if sys.maxsize > 2**31: MACROS += [('DLO
+@@ -133,30 +126,17 @@
  
  cholmod = Extension('cholmod',
      library_dirs = [ BLAS_LIB_DIR ],
 -    libraries = LAPACK_LIB + BLAS_LIB,
--    include_dirs = [ 'C/SuiteSparse/CHOLMOD/Include', 
--        'C/SuiteSparse/COLAMD', 'C/SuiteSparse/AMD/Include', 
--        'C/SuiteSparse/UFconfig', 'C/SuiteSparse/COLAMD/Include' ],
+-    include_dirs = [ 'src/C/SuiteSparse/CHOLMOD/Include', 
+-        'src/C/SuiteSparse/COLAMD', 
+-        'src/C/SuiteSparse/AMD/Include', 
+-        'src/C/SuiteSparse/COLAMD/Include',
+-        'src/C/SuiteSparse/SuiteSparse_config' ],
 +    libraries = LAPACK_LIB + BLAS_LIB + [ 'cholmod' ],
-+    include_dirs = [ '/usr/include/suitesparse' ],
-     define_macros = MACROS + [('NPARTITION', '1')],
++    include_dirs = [ '/usr/include/suitesparse' ], 
+     define_macros = MACROS + [('NPARTITION', '1'), ('NTIMER', '1')],
      extra_link_args = BLAS_EXTRA_LINK_ARGS,
--    sources = [ 'C/cholmod.c' ] + 
--        ['C/SuiteSparse/AMD/Source/' + s for s in ['amd_global.c',
+-    sources = [ 'src/C/cholmod.c' ] + 
+-        ['src/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',
+-        ['src/C/SuiteSparse/COLAMD/Source/' + s for s in ['colamd.c',
 -            'colamd_global.c']] +
--        glob('C/SuiteSparse/CHOLMOD/Core/c*.c') +
--        glob('C/SuiteSparse/CHOLMOD/Cholesky/c*.c') +
--        ['C/SuiteSparse/CHOLMOD/Check/cholmod_check.c'] +
--        glob('C/SuiteSparse/CHOLMOD/Supernodal/c*.c') )
-+    sources = [ 'C/cholmod.c' ])
+-        ['src/C/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c'] +
+-        glob('src/C/SuiteSparse/CHOLMOD/Core/c*.c') +
+-        glob('src/C/SuiteSparse/CHOLMOD/Cholesky/c*.c') +
+-        ['src/C/SuiteSparse/CHOLMOD/Check/cholmod_check.c'] +
+-        glob('src/C/SuiteSparse/CHOLMOD/Supernodal/c*.c') )
++    sources = [ 'src/C/cholmod.c' ])
  
  amd = Extension('amd', 
--    include_dirs = [ 'C/SuiteSparse/AMD/Include', 
--        'C/SuiteSparse/UFconfig' ],
-+    include_dirs = [ '/usr/include/suitesparse' ],
+-    include_dirs = [ 'src/C/SuiteSparse/AMD/Include', 
+-        'src/C/SuiteSparse/SuiteSparse_config' ],
++    include_dirs = [ '/usr/include/suitesparse' ], 
 +    libraries = [ 'amd' ],
      define_macros = MACROS,
--    sources = [ 'C/amd.c' ] + glob('C/SuiteSparse/AMD/Source/*.c') )
-+    sources = [ 'C/amd.c' ])
+-    sources = [ 'src/C/amd.c' ] + glob('src/C/SuiteSparse/AMD/Source/*.c') )
++    sources = [ 'src/C/amd.c' ] )
  
  misc_solvers = Extension('misc_solvers',
      libraries = LAPACK_LIB + BLAS_LIB,
diff --git a/python-cvxopt.spec b/python-cvxopt.spec
index 72be97d..d521cef 100644
--- a/python-cvxopt.spec
+++ b/python-cvxopt.spec
@@ -1,11 +1,11 @@
 Name:           python-cvxopt
-Version:        1.1.5
-Release:        7%{?dist}
+Version:        1.1.6
+Release:        1%{?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
+URL:            http://cvxopt.org/
+Source0:        https://github.com/%{name}/%{name}/archive/%{version}.tar.gz
 # Will submit patch0 to upstream ASAP
 Patch0:         python-cvxopt-fixglpkinclude.patch
 # Use the system suitesparse instead of building one, and ensure the ATLAS BLAS
@@ -69,28 +69,32 @@ on the strengths of Python as a high-level programming language.
 
 # Fix library path
 if [ %{__isa_bits} = "64" ]; then
-  sed -i "s|/usr/lib|%{_libdir}|" src/setup.py
+  sed -i "s|/usr/lib|%{_libdir}|" setup.py
 fi
 
 # Remove internal copy of system library
-rm -rf src/C/SuiteSparse*/
+rm -rf src/C/SuiteSparse*
 
 # Remove useless executable bits
 find examples -name \*.py -perm /0111 | xargs chmod a-x
 
+# Fix the version number in the documentation
+sed -i 's/1\.1\.5/%{version}/' doc/source/conf.py
+
 # Make a copy so we can build for python3 as well
 cp -a src src3
 
 %build
+export CC="gcc"
+export LDSHARED="gcc -shared -Wl,--as-needed $RPM_LD_FLAGS"
+
 # Build for python 2
-pushd src
-  CC="gcc" LDSHARED="gcc -shared -Wl,--as-needed" %{__python2} setup.py build
-popd
+%{__python2} setup.py build
 
 # Build for python 3
-pushd src3
-  CC="gcc" LDSHARED="gcc -shared -Wl,--as-needed" %{__python3} setup.py build
-popd
+mv src src2
+mv src3 src
+%{__python3} setup.py build
 
 # Rebuild the documentation
 make -C doc clean
@@ -99,19 +103,17 @@ rm -f doc/build/html/.buildinfo
 
 
 %install
-# Install for python 2
-pushd src
-  %{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
-popd
-
 # Install for python 3
-pushd src3
-  %{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
-popd
+%{__python3} setup.py install --skip-build --root %{buildroot}
+
+# Install for python 2
+mv src src3
+mv src2 src
+%{__python2} setup.py install --skip-build --root %{buildroot}
 
 # Install the examples
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
-cp -a examples $RPM_BUILD_ROOT%{_datadir}/%{name}/
+mkdir -p %{buildroot}%{_datadir}/%{name}
+cp -a examples %{buildroot}%{_datadir}/%{name}/
 
 
 %files
@@ -129,6 +131,10 @@ cp -a examples $RPM_BUILD_ROOT%{_datadir}/%{name}/
 
 
 %changelog
+* Tue May 28 2013 Jerry James <loganjerry at gmail.com> - 1.1.6-1
+- New upstream release
+- New project URL
+
 * Sat Feb  2 2013 Jerry James <loganjerry at gmail.com> - 1.1.5-7
 - Rebuild for new glpk
 
diff --git a/sources b/sources
index df32358..8de251c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f71e6e3e1c2e2264deb0887441783b05  cvxopt-1.1.5.tar.gz
+e940636b237715aeea5cffff3b0d9f55  1.1.6.tar.gz


More information about the scm-commits mailing list