From 197c3d0d6351292826b57e37b7b607b0d0e5e2cb Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Apr 11 2018 13:51:20 +0000 Subject: Update to 7.0.2. --- diff --git a/.gitignore b/.gitignore index 22783e4..181fabe 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /python-pycxx-6.*.src.rpm /noarch/ /cxx-code-*-trunk/ +/pycxx-7.0.2.tar.gz diff --git a/python-pycxx-6.2.8-change-include-paths.patch b/python-pycxx-6.2.8-change-include-paths.patch deleted file mode 100644 index 4bb62d4..0000000 --- a/python-pycxx-6.2.8-change-include-paths.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/Src/cxxextensions.c b/Src/cxxextensions.c -index 28a8e1d..cfab556 100644 ---- a/Src/cxxextensions.c -+++ b/Src/cxxextensions.c -@@ -37,7 +37,7 @@ - #include "CXX/WrapPython.h" - - #if PY_MAJOR_VERSION == 2 --#include "Src/Python2/cxxextensions.c" -+#include "Python2/cxxextensions.c" - #else --#include "Src/Python3/cxxextensions.c" -+#include "Python3/cxxextensions.c" - #endif -diff --git a/Src/cxxsupport.cxx b/Src/cxxsupport.cxx -index 1f2fb43..946e60d 100644 ---- a/Src/cxxsupport.cxx -+++ b/Src/cxxsupport.cxx -@@ -37,7 +37,7 @@ - #include "CXX/WrapPython.h" - - #if PY_MAJOR_VERSION == 2 --#include "Src/Python2/cxxsupport.cxx" -+#include "Python2/cxxsupport.cxx" - #else --#include "Src/Python3/cxxsupport.cxx" -+#include "Python3/cxxsupport.cxx" - #endif diff --git a/python-pycxx-6.2.8-setup.py.patch b/python-pycxx-6.2.8-setup.py.patch deleted file mode 100644 index 9b0d675..0000000 --- a/python-pycxx-6.2.8-setup.py.patch +++ /dev/null @@ -1,85 +0,0 @@ -This patch makes several changes to setup.py: - -- Add omitted headers and sources to install - - Extend install_headers to handle subdirs -- Install only Python v2 or v3 code as appropriate -- Update version number -- Convert tabs to spaces (from original RPM) - - http://www.python.org/dev/peps/pep-0008/#tabs-or-spaces - ---- a/setup.py -+++ b/setup.py -@@ -1,13 +1,31 @@ - import os, sys - from glob import glob - from distutils.command.install import install -+from distutils.command.install_headers import install_headers - from distutils.core import setup - --headers = (glob( os.path.join( "CXX","*.hxx" ) ) -- +glob( os.path.join( "CXX","*.h" ) )) --sources = (glob( os.path.join( "Src", "*.cxx" ) ) -- +glob( os.path.join( "Src", "*.c" ) )) -+# either "Python2" or "Python3" -+PythonVer = "Python" + sys.version[0] - -+headers = [ -+ (None, -+ glob(os.path.join("CXX","*.hxx")) + \ -+ glob(os.path.join("CXX","*.h")) -+ ), -+ (PythonVer, -+ glob(os.path.join("CXX",PythonVer,"*.hxx")) -+ ) -+ ] -+ -+sources = [ -+ ("CXX", -+ glob(os.path.join("Src", "*.cxx")) + \ -+ glob(os.path.join("Src", "*.c")) -+ ), -+ (os.path.join("CXX",PythonVer), -+ glob(os.path.join("Src",PythonVer,"*")) -+ ) -+ ] - - class my_install (install): - -@@ -17,10 +35,26 @@ class my_install (install): - install.finalize_options (self) - - def run (self): -- self.distribution.data_files = [("CXX", sources)] -+ self.distribution.data_files = sources - self.distribution.headers = headers - install.run (self) - -+class my_install_headers (install_headers): -+ def run (self): -+ if not self.distribution.headers: -+ return -+ -+ for subdir, headers in self.distribution.headers: -+ try: -+ dir = os.path.join(self.install_dir,subdir) -+ except: -+ dir = self.install_dir -+ self.mkpath(dir) -+ for header in headers: -+ (out, _) = self.copy_file(header, dir) -+ self.outfiles.append(out) -+ -+ - # read the version from the master file CXX/Version.hxx - v_maj = None - v_min = None -@@ -43,7 +77,8 @@ setup (name = "CXX", - description = "Facility for extending Python with C++", - url = "http://cxx.sourceforge.net", - -- cmdclass = {'install': my_install}, -+ cmdclass = {'install': my_install, -+ 'install_headers': my_install_headers}, - packages = ['CXX'], - package_dir = {'CXX': 'Lib'} - ) diff --git a/python-pycxx-7.0.2-change-include-paths.patch b/python-pycxx-7.0.2-change-include-paths.patch new file mode 100644 index 0000000..4bb62d4 --- /dev/null +++ b/python-pycxx-7.0.2-change-include-paths.patch @@ -0,0 +1,28 @@ +diff --git a/Src/cxxextensions.c b/Src/cxxextensions.c +index 28a8e1d..cfab556 100644 +--- a/Src/cxxextensions.c ++++ b/Src/cxxextensions.c +@@ -37,7 +37,7 @@ + #include "CXX/WrapPython.h" + + #if PY_MAJOR_VERSION == 2 +-#include "Src/Python2/cxxextensions.c" ++#include "Python2/cxxextensions.c" + #else +-#include "Src/Python3/cxxextensions.c" ++#include "Python3/cxxextensions.c" + #endif +diff --git a/Src/cxxsupport.cxx b/Src/cxxsupport.cxx +index 1f2fb43..946e60d 100644 +--- a/Src/cxxsupport.cxx ++++ b/Src/cxxsupport.cxx +@@ -37,7 +37,7 @@ + #include "CXX/WrapPython.h" + + #if PY_MAJOR_VERSION == 2 +-#include "Src/Python2/cxxsupport.cxx" ++#include "Python2/cxxsupport.cxx" + #else +-#include "Src/Python3/cxxsupport.cxx" ++#include "Python3/cxxsupport.cxx" + #endif diff --git a/python-pycxx-7.0.2-setup.py.patch b/python-pycxx-7.0.2-setup.py.patch new file mode 100644 index 0000000..9b0d675 --- /dev/null +++ b/python-pycxx-7.0.2-setup.py.patch @@ -0,0 +1,85 @@ +This patch makes several changes to setup.py: + +- Add omitted headers and sources to install + - Extend install_headers to handle subdirs +- Install only Python v2 or v3 code as appropriate +- Update version number +- Convert tabs to spaces (from original RPM) + - http://www.python.org/dev/peps/pep-0008/#tabs-or-spaces + +--- a/setup.py ++++ b/setup.py +@@ -1,13 +1,31 @@ + import os, sys + from glob import glob + from distutils.command.install import install ++from distutils.command.install_headers import install_headers + from distutils.core import setup + +-headers = (glob( os.path.join( "CXX","*.hxx" ) ) +- +glob( os.path.join( "CXX","*.h" ) )) +-sources = (glob( os.path.join( "Src", "*.cxx" ) ) +- +glob( os.path.join( "Src", "*.c" ) )) ++# either "Python2" or "Python3" ++PythonVer = "Python" + sys.version[0] + ++headers = [ ++ (None, ++ glob(os.path.join("CXX","*.hxx")) + \ ++ glob(os.path.join("CXX","*.h")) ++ ), ++ (PythonVer, ++ glob(os.path.join("CXX",PythonVer,"*.hxx")) ++ ) ++ ] ++ ++sources = [ ++ ("CXX", ++ glob(os.path.join("Src", "*.cxx")) + \ ++ glob(os.path.join("Src", "*.c")) ++ ), ++ (os.path.join("CXX",PythonVer), ++ glob(os.path.join("Src",PythonVer,"*")) ++ ) ++ ] + + class my_install (install): + +@@ -17,10 +35,26 @@ class my_install (install): + install.finalize_options (self) + + def run (self): +- self.distribution.data_files = [("CXX", sources)] ++ self.distribution.data_files = sources + self.distribution.headers = headers + install.run (self) + ++class my_install_headers (install_headers): ++ def run (self): ++ if not self.distribution.headers: ++ return ++ ++ for subdir, headers in self.distribution.headers: ++ try: ++ dir = os.path.join(self.install_dir,subdir) ++ except: ++ dir = self.install_dir ++ self.mkpath(dir) ++ for header in headers: ++ (out, _) = self.copy_file(header, dir) ++ self.outfiles.append(out) ++ ++ + # read the version from the master file CXX/Version.hxx + v_maj = None + v_min = None +@@ -43,7 +77,8 @@ setup (name = "CXX", + description = "Facility for extending Python with C++", + url = "http://cxx.sourceforge.net", + +- cmdclass = {'install': my_install}, ++ cmdclass = {'install': my_install, ++ 'install_headers': my_install_headers}, + packages = ['CXX'], + package_dir = {'CXX': 'Lib'} + ) diff --git a/python-pycxx.spec b/python-pycxx.spec index 9b2031d..a467e1a 100644 --- a/python-pycxx.spec +++ b/python-pycxx.spec @@ -16,8 +16,8 @@ %global vcs_rel %{download_date}svn%{svn_rev} Name: python-%{modname} -Version: 6.2.8 -Release: 7%{?dist} +Version: 7.0.2 +Release: 1%{?dist} Summary: Write Python extensions in C++ Group: Development/Libraries @@ -28,7 +28,6 @@ BuildArch: noarch # SVN version contains updates for Python3 Source0: http://downloads.sourceforge.net/cxx/%{modname}-%{version}.tar.gz -#Source0: http://sourceforge.net/code-snapshots/svn/c/cx/cxx/code/cxx-code-%{svn_rev}-trunk.zip # Patch0: remove unnecessary 'Src/' directory from include path in sources Patch0: %{name}-%{version}-change-include-paths.patch # Patch1: fix several problems with install, esp. omitted files, python @@ -121,7 +120,7 @@ srcdir=%{_usrsrc}/CXX Name: PyCXX Description: Write Python extensions in C++ -Version: %{version} +Version: 7.0.2 Cflags: -I\${includedir} EOF @@ -162,6 +161,9 @@ test "$(pkg-config --modversion PyCXX)" = "%{version}" %changelog +* Wed Apr 11 2018 Richard Shaw - 7.0.2-1 +- Update to 7.0.2. + * Fri Feb 09 2018 Fedora Release Engineering - 6.2.8-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index 0087c79..ec0a937 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8c6cdf83587d62171a0c0bb5bce0bda2 pycxx-6.2.8.tar.gz +SHA512 (pycxx-7.0.2.tar.gz) = 88e2484dbeec68133d37299bed90f4b0d38f6e86b3cfb1c3f95f8bc3f5e0800c9cebd3ff57844c056bb1ca24b274c7f25e73983537365aff9765b995f8878428