X Tutup
from setuptools import setup from setuptools.command.install import install as _install from setuptools.dist import Distribution try: # Wheel platform tag gets complicated on Mac, see: # http://lepture.com/en/2014/python-on-a-hard-wheel from wheel.bdist_wheel import bdist_wheel class _bdist_wheel(bdist_wheel): def get_tag(self): tag = bdist_wheel.get_tag(self) platform = ("macosx_10_6_intel" ".macosx_10_9_intel.macosx_10_9_x86_64" ".macosx_10_10_intel.macosx_10_10_x86_64") tag = (tag[0], tag[1], platform) return tag cmdclass = {"bdist_wheel": _bdist_wheel} except ImportError: cmdclass = {} import sys import os import subprocess class BinaryDistribution(Distribution): def is_pure(self): return False def get_package_data(directory, base_dir=""): """ Lists directory recursively. Includes only files. Empty directories are not included. File paths include the directory path passed to this function. """ if base_dir: old_dir = os.getcwd() os.chdir(base_dir) files = os.listdir(directory) ret = [] for f in files: f = os.path.join(directory, f) if os.path.isdir(f): ret = ret + get_package_data(f) else: ret.append(f) if base_dir: os.chdir(old_dir) return ret setup( distclass=BinaryDistribution, cmdclass=cmdclass, 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/*.png', 'wx/*.txt', 'wx/images/*.png', '*.txt', 'subprocess', '*.so', '*.dylib', 'debug.log', 'examples/debug.log', 'examples/wx/debug.log',] + get_package_data("Resources/", "cefpython3/") } )
X Tutup