Skip to content

Commit 2ca8c28

Browse files
committed
Update setup.py installers. Use setup(distclass=) instead of a hack
to set is_pure=False.
1 parent d0189d5 commit 2ca8c28

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

cefpython/cef3/linux/installer/setup.py.template

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
# Overwrite distutils.dist.Distribution.is_pure()
2-
# to return False, so that Python Wheel doesn't set
3-
# "none" platform tag.
4-
import distutils.dist
5-
def is_pure(self):
6-
return False
7-
distutils.dist.Distribution.is_pure = is_pure
8-
91
from setuptools import setup
102
from setuptools.command.install import install as _install
3+
from setuptools.dist import Distribution
114
import sys
125
import os
136
import subprocess
@@ -50,7 +43,12 @@ class install(_install):
5043
_install.run(self)
5144
my_post_install()
5245

46+
class BinaryDistribution(Distribution):
47+
def is_pure(self):
48+
return False
49+
5350
setup(
51+
distclass=BinaryDistribution,
5452
cmdclass={'install': install},
5553
name='cefpython3', # No spaces here, so that it works with deb packages.
5654
version='%(APP_VERSION)s',

cefpython/cef3/windows/installer/setup.py.template

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
# Overwrite distutils.dist.Distribution.is_pure()
2-
# to return False, so that Python Wheel doesn't set
3-
# "none" platform tag.
4-
import distutils.dist
5-
def is_pure(self):
6-
return False
7-
distutils.dist.Distribution.is_pure = is_pure
8-
91
from setuptools import setup
102
from setuptools.command.install import install as _install
3+
from setuptools.dist import Distribution
114
import sys
125
import os
136
import subprocess
@@ -20,7 +13,12 @@ class install(_install):
2013
_install.run(self)
2114
my_post_install()
2215

16+
class BinaryDistribution(Distribution):
17+
def is_pure(self):
18+
return False
19+
2320
setup(
21+
distclass=BinaryDistribution,
2422
cmdclass={'install': install},
2523
name='cefpython3', # No spaces here, so that it works with deb packages.
2624
version='%(APP_VERSION)s',

0 commit comments

Comments
 (0)