try: # The setuptools package is not installed by default # on a clean Ubuntu. Might be also a case on Windows. # Python Eggs and Wheels can be created only with setuptools. from setuptools import setup from setuptools.command.install import install as _install from setuptools.dist import Distribution print("[setup.py] Using setuptools") except: from distutils.core import setup from distutils.command.install import install as _install from distutils.dist import Distribution print("[setup.py] Using distutils") import sys import os import subprocess def post_install(): """ Post install tasks """ print("[setup.py] post_install()") # Nothing extra is required to do on Windows. class install(_install): def run(self): _install.run(self) post_install() class BinaryDistribution(Distribution): def is_pure(self): return False setup( distclass=BinaryDistribution, cmdclass={'install': install}, name='cefpython3', # No spaces here, so that it works with deb packages. version='%(APP_VERSION)s', description='Python bindings for the Chromium Embedded Framework', license='BSD 3-Clause', author='Czarek Tomczak', author_email='czarek.tomczak@gmail.com', url='http://code.google.com/p/cefpython/', platforms=['%(PLATFORM)s'], packages=['cefpython3', 'cefpython3.wx'], package_data={'cefpython3': [ 'examples/*.py', 'examples/*.html', 'examples/*.js', 'examples/*.css', 'examples/wx/*.py', 'examples/wx/*.html', 'examples/wx/*.js', 'examples/wx/*.css', 'examples/wx/*.png', 'locales/*.pak', 'wx/*.txt', 'wx/images/*.png', '*.txt', 'cefclient.exe', 'subprocess.exe', '*.pyd', '*.dll', '*.pak', 'debug.log', 'examples/debug.log', 'examples/wx/debug.log', ]} )