Skip to content

Commit e4a8810

Browse files
committed
merge build fixes
1 parent da2fa77 commit e4a8810

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

appveyor/setup.cfg

-5
This file was deleted.

config.sh

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
set +e
33
echo "=== Loading config.sh === "
44

5-
cp travis/setup.cfg .
6-
75
if [ -n "$IS_OSX" ]; then
86
echo " > OSX environment "
97
function build_wheel {

setup.py

+16-2
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,39 @@
5050

5151
package_data['cv2'] += ["LICENSE.txt", "LICENSE-3RD-PARTY.txt"]
5252

53+
This is my old hack to force binary distribution.
54+
55+
However, it doesn't work properly because the binaries
56+
are placed into purelib instead of platlib.
57+
5358
class BinaryDistribution(Distribution):
54-
""" Forces BinaryDistribution. """
5559
def has_ext_modules(self):
5660
return True
5761

5862
def is_pure(self):
5963
return False
64+
"""
65+
66+
# This creates a list which is empty but returns a length of 1.
67+
# Should make the wheel a binary distribution and platlib compliant.
68+
69+
70+
class EmptyListWithLength(list):
71+
def __len__(self):
72+
return 1
73+
6074

6175
setup(name=package_name,
6276
version=opencv_version,
6377
url='https://github.com/skvark/opencv-python',
6478
license='MIT',
6579
description='Wrapper package for OpenCV python bindings.',
6680
long_description=long_description,
67-
distclass=BinaryDistribution,
6881
packages=['cv2'],
6982
package_data=package_data,
7083
maintainer="Olli-Pekka Heinisuo",
7184
include_package_data=True,
85+
ext_modules=EmptyListWithLength(),
7286
install_requires="numpy>=%s" % numpy_version,
7387
classifiers=[
7488
'Development Status :: 5 - Production/Stable',

travis/setup.cfg

-5
This file was deleted.

0 commit comments

Comments
 (0)