Updated to address pytest excluded tests specification feedback and fix build issues identified by test runs when building for multiple Python versions. OBS-URL: https://build.opensuse.org/request/show/1226585 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pulsar-client?expand=0&rev=1
34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
--- pulsar-client-python-3.5.0.orig/setup.py 2024-04-02 02:38:10.000000000 -0400
|
|
+++ pulsar-client-python-3.5.0.new/setup.py 2024-11-26 10:35:12.536508228 -0500
|
|
@@ -63,10 +63,26 @@ class my_build_ext(build_ext.build_ext):
|
|
if 'Windows' in platform.platform():
|
|
shutil.copyfile('_pulsar.pyd', self.get_ext_fullpath(ext.name))
|
|
else:
|
|
- try:
|
|
- shutil.copyfile('_pulsar.so', self.get_ext_fullpath(ext.name))
|
|
- except FileNotFoundError:
|
|
- shutil.copyfile('lib_pulsar.so', self.get_ext_fullpath(ext.name))
|
|
+ # construct list of pre-compiled pulsar library files
|
|
+ # to search for in preferred order.
|
|
+ pyver = '.'.join(platform.python_version_tuple()[0:2])
|
|
+ so_files = [
|
|
+ '_pulsar' + pyver + '.so',
|
|
+ 'lib_pulsar' + pyver + '.so',
|
|
+ '_pulsar.so',
|
|
+ 'lib_pulsar.so'
|
|
+ ]
|
|
+ # check for all but the last library file in order
|
|
+ for so_file in so_files[0:-1]:
|
|
+
|
|
+ try:
|
|
+ shutil.copyfile(so_file, self.get_ext_fullpath(ext.name))
|
|
+ break
|
|
+ except FileNotFoundError:
|
|
+ continue
|
|
+ else:
|
|
+ # check last library file, raising an exception if not found
|
|
+ shutil.copyfile(so_files[-1], self.get_ext_fullpath(ext.name))
|
|
|
|
|
|
# Core Client dependencies
|