Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/m2crypto/files/
Date: Sun, 13 Aug 2017 11:25:06
Message-Id: 1502623428.e48e6a67c2bf03e4165d51f2793dc904f73faddb.soap@gentoo
1 commit: e48e6a67c2bf03e4165d51f2793dc904f73faddb
2 Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Tue Aug 8 08:25:22 2017 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 13 11:23:48 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e48e6a67
7
8 dev-python/m2crypto: remove unused patches
9
10 Closes: https://github.com/gentoo/gentoo/pull/5352
11
12 .../0.22.3-Use-swig-generated-python-loader.patch | 138 ---------------------
13 dev-python/m2crypto/files/0.22.3-packaging.patch | 69 -----------
14 2 files changed, 207 deletions(-)
15
16 diff --git a/dev-python/m2crypto/files/0.22.3-Use-swig-generated-python-loader.patch b/dev-python/m2crypto/files/0.22.3-Use-swig-generated-python-loader.patch
17 deleted file mode 100644
18 index 9ddd5509fdf..00000000000
19 --- a/dev-python/m2crypto/files/0.22.3-Use-swig-generated-python-loader.patch
20 +++ /dev/null
21 @@ -1,138 +0,0 @@
22 -From 803188070e486030cb1d2e53692b39305c742b17 Mon Sep 17 00:00:00 2001
23 -From: Joe Julian <jjulian@××.com>
24 -Date: Tue, 19 May 2015 23:54:08 -0700
25 -Subject: [PATCH] Use swig generated python loader
26 -
27 ----
28 - .gitignore | 6 +++++-
29 - M2Crypto/__init__.py | 4 ++--
30 - M2Crypto/m2.py | 4 +---
31 - SWIG/_m2crypto.def | 2 +-
32 - SWIG/_m2crypto.i | 2 +-
33 - setup.py | 25 +++++++++++++++++++++----
34 - 6 files changed, 31 insertions(+), 12 deletions(-)
35 -
36 -diff --git a/M2Crypto/__init__.py b/M2Crypto/__init__.py
37 -index 647e057..38dbbd5 100644
38 ---- a/M2Crypto/__init__.py
39 -+++ b/M2Crypto/__init__.py
40 -@@ -19,7 +19,7 @@ Copyright 2008-2011 Heikki Toivonen. All rights reserved.
41 - version_info = (0, 22)
42 - version = '.'.join([str(_v) for _v in version_info])
43 -
44 --import __m2crypto
45 -+import m2crypto
46 - import m2
47 - import ASN1
48 - import AuthCookie
49 -@@ -47,4 +47,4 @@ import m2xmlrpclib
50 - import threading
51 - import util
52 -
53 --__m2crypto.lib_init()
54 -+m2crypto.lib_init()
55 -diff --git a/M2Crypto/m2.py b/M2Crypto/m2.py
56 -index e4bb695..516cadb 100644
57 ---- a/M2Crypto/m2.py
58 -+++ b/M2Crypto/m2.py
59 -@@ -25,7 +25,5 @@ Portions created by Open Source Applications Foundation (OSAF) are
60 - Copyright (C) 2004 OSAF. All Rights Reserved.
61 - """
62 -
63 --from __m2crypto import *
64 -+from m2crypto import *
65 - lib_init()
66 --
67 --
68 -diff --git a/SWIG/_m2crypto.def b/SWIG/_m2crypto.def
69 -index 753db2c..3e9d5bc 100644
70 ---- a/SWIG/_m2crypto.def
71 -+++ b/SWIG/_m2crypto.def
72 -@@ -1,2 +1,2 @@
73 - EXPORTS
74 --init__m2crypto
75 -+init_m2crypto
76 -diff --git a/SWIG/_m2crypto.i b/SWIG/_m2crypto.i
77 -index 50be5c3..e491222 100644
78 ---- a/SWIG/_m2crypto.i
79 -+++ b/SWIG/_m2crypto.i
80 -@@ -8,7 +8,7 @@
81 - *
82 - */
83 -
84 --%module(threads=1) _m2crypto
85 -+%module(threads=1) m2crypto
86 - /* We really don't need threadblock (PyGILState_Ensure() etc.) anywhere.
87 - Disable threadallow as well, only enable it for operations likely to
88 - block. */
89 -diff --git a/setup.py b/setup.py
90 -index bac6f9f..fc89513 100644
91 ---- a/setup.py
92 -+++ b/setup.py
93 -@@ -17,9 +17,22 @@ import os, sys, platform
94 - from setuptools import setup
95 - from setuptools.command import build_ext
96 -
97 -+from distutils.util import get_platform
98 - from distutils.core import Extension
99 - from distutils.spawn import find_executable
100 -
101 -+from distutils.command.build import build
102 -+from setuptools.command.install import install
103 -+
104 -+class CustomBuild(build):
105 -+ def run(self):
106 -+ self.run_command('build_ext')
107 -+ build.run(self)
108 -+
109 -+class CustomInstall(install):
110 -+ def run(self):
111 -+ self.run_command('build_ext')
112 -+ self.do_egg_install()
113 -
114 - class _M2CryptoBuildExt(build_ext.build_ext):
115 - '''Specialization of build_ext to enable swig_opts to inherit any
116 -@@ -70,11 +83,12 @@ class _M2CryptoBuildExt(build_ext.build_ext):
117 -
118 - self.add_multiarch_paths()
119 -
120 -- opensslIncludeDir = os.path.join(self.openssl, 'include')
121 -+ includeDir = os.path.join(self.openssl, 'include')
122 -+ opensslIncludeDir = os.path.join(self.openssl, 'include', 'openssl')
123 - opensslLibraryDir = os.path.join(self.openssl, 'lib')
124 -
125 - self.swig_opts = ['-I%s' % i for i in self.include_dirs + \
126 -- [opensslIncludeDir, os.path.join(opensslIncludeDir, "openssl")]]
127 -+ [opensslIncludeDir, includeDir]]
128 - self.swig_opts.append('-includeall')
129 - self.swig_opts.append('-modern')
130 -
131 -@@ -85,6 +99,9 @@ class _M2CryptoBuildExt(build_ext.build_ext):
132 - elif platform.architecture()[0] == '32bit':
133 - self.swig_opts.append('-D__i386__')
134 -
135 -+ self.swig_opts.append('-outdir')
136 -+ self.swig_opts.append(os.path.join(os.getcwd(),'M2Crypto'))
137 -+
138 - self.include_dirs += [os.path.join(self.openssl, opensslIncludeDir),
139 - os.path.join(os.getcwd(), 'SWIG')]
140 -
141 -@@ -103,7 +120,7 @@ if sys.platform == 'darwin':
142 - else:
143 - my_extra_compile_args = []
144 -
145 --m2crypto = Extension(name = 'M2Crypto.__m2crypto',
146 -+m2crypto = Extension(name = 'M2Crypto._m2crypto',
147 - sources = ['SWIG/_m2crypto.i'],
148 - extra_compile_args = ['-DTHREADING'] + my_extra_compile_args,
149 - #extra_link_args = ['-Wl,-search_paths_first'], # Uncomment to build Universal Mac binaries
150 -@@ -145,5 +162,5 @@ interface.''',
151 -
152 - ext_modules = [m2crypto],
153 - test_suite='tests.alltests.suite',
154 -- cmdclass = {'build_ext': _M2CryptoBuildExt}
155 -+ cmdclass = {'build': CustomBuild, 'install': CustomInstall, 'build_ext': _M2CryptoBuildExt}
156 - )
157 ---
158 -2.4.1
159 -
160
161 diff --git a/dev-python/m2crypto/files/0.22.3-packaging.patch b/dev-python/m2crypto/files/0.22.3-packaging.patch
162 deleted file mode 100644
163 index 26952a4e78e..00000000000
164 --- a/dev-python/m2crypto/files/0.22.3-packaging.patch
165 +++ /dev/null
166 @@ -1,69 +0,0 @@
167 -From 0f2c82f097cf6d3722b7793fe1159160f3f52725 Mon Sep 17 00:00:00 2001
168 -From: Mike Gilbert <floppym@g.o>
169 -Date: Mon, 25 May 2015 12:08:47 -0400
170 -Subject: [PATCH] Gentoo-specific packaging fixes
171 -
172 -Fix cross-compiles
173 -EPREFIX support
174 ----
175 - setup.py | 20 ++++----------------
176 - 1 file changed, 4 insertions(+), 16 deletions(-)
177 -
178 -diff --git a/setup.py b/setup.py
179 -index fc89513..8360e7e 100644
180 ---- a/setup.py
181 -+++ b/setup.py
182 -@@ -32,7 +32,7 @@ class CustomBuild(build):
183 - class CustomInstall(install):
184 - def run(self):
185 - self.run_command('build_ext')
186 -- self.do_egg_install()
187 -+ install.run(self)
188 -
189 - class _M2CryptoBuildExt(build_ext.build_ext):
190 - '''Specialization of build_ext to enable swig_opts to inherit any
191 -@@ -81,29 +81,19 @@ class _M2CryptoBuildExt(build_ext.build_ext):
192 -
193 - build_ext.build_ext.finalize_options(self)
194 -
195 -- self.add_multiarch_paths()
196 --
197 - includeDir = os.path.join(self.openssl, 'include')
198 - opensslIncludeDir = os.path.join(self.openssl, 'include', 'openssl')
199 - opensslLibraryDir = os.path.join(self.openssl, 'lib')
200 -
201 -- self.swig_opts = ['-I%s' % i for i in self.include_dirs + \
202 -- [opensslIncludeDir, includeDir]]
203 -+ eprefix = os.getenv('EPREFIX', '')
204 -+ self.swig_opts = ['-I' + eprefix + '/usr/include']
205 - self.swig_opts.append('-includeall')
206 - self.swig_opts.append('-modern')
207 -
208 -- # Fedora does hat tricks.
209 -- if platform.linux_distribution()[0] in ['Fedora', 'CentOS']:
210 -- if platform.architecture()[0] == '64bit':
211 -- self.swig_opts.append('-D__x86_64__')
212 -- elif platform.architecture()[0] == '32bit':
213 -- self.swig_opts.append('-D__i386__')
214 --
215 - self.swig_opts.append('-outdir')
216 - self.swig_opts.append(os.path.join(os.getcwd(),'M2Crypto'))
217 -
218 -- self.include_dirs += [os.path.join(self.openssl, opensslIncludeDir),
219 -- os.path.join(os.getcwd(), 'SWIG')]
220 -+ self.include_dirs += [os.path.join(os.getcwd(), 'SWIG')]
221 -
222 - if sys.platform == 'cygwin':
223 - # Cygwin SHOULD work (there's code in distutils), but
224 -@@ -113,8 +103,6 @@ class _M2CryptoBuildExt(build_ext.build_ext):
225 - # Someday distutils will be fixed and this won't be needed.
226 - self.library_dirs += [os.path.join(self.openssl, 'bin')]
227 -
228 -- self.library_dirs += [os.path.join(self.openssl, opensslLibraryDir)]
229 --
230 - if sys.platform == 'darwin':
231 - my_extra_compile_args = ["-Wno-deprecated-declarations"]
232 - else:
233 ---
234 -2.4.1
235 -