@@ -66,56 +66,66 @@ def run(self):
6666 post_install_hook ()
6767
6868
69- class BinaryDistribution (Distribution ):
70- def is_pure (self ):
71- return False
72-
73-
7469# Provide a custom install command
7570print ("[setup.py] Overload install command to enable execution of"
7671 " post install hook" )
7772cmdclass = {"install" : custom_install }
7873
79- # Set custom platform tags on Mac when generating wheel package. See:
80- # http://lepture.com/en/2014/python-on-a-hard-wheel
81- if platform .system () == "Darwin" and "bdist_wheel" in sys .argv :
82- print ("[setup.py] Overload bdist_wheel command to add custom"
83- " platform tags" )
84- from wheel .bdist_wheel import bdist_wheel
85-
86- class custom_bdist_wheel (bdist_wheel ):
87- def get_tag (self ):
88- tag = bdist_wheel .get_tag (self )
89- platform_tag = ("macosx_10_6_intel"
90- ".macosx_10_9_intel.macosx_10_9_x86_64"
91- ".macosx_10_10_intel.macosx_10_10_x86_64" )
92- tag = (tag [0 ], tag [1 ], platform_tag )
93- return tag
94-
95- cmdclass ["bdist_wheel" ] = custom_bdist_wheel
96- elif platform .system () in ["Windows" , "Linux" ] and "bdist_wheel" in sys .argv :
97- # On Windows and Linux platform tag is always "any".
74+ # Fix platform tag in wheel package
75+ if "bdist_wheel" in sys .argv :
9876 print ("[setup.py] Overload bdist_wheel command to fix platform tag" )
9977 from wheel .bdist_wheel import bdist_wheel
10078
10179 class custom_bdist_wheel (bdist_wheel ):
10280 def get_tag (self ):
10381 tag = bdist_wheel .get_tag (self )
10482 platform_tag = sysconfig .get_platform ()
83+ if platform .system () == "Linux" :
84+ assert "linux" in platform_tag
85+ # "linux-x86_64" replace with "manylinux1_x86_64"
86+ platform_tag = platform_tag .replace ("linux" , "manylinux1" )
87+ platform_tag = platform_tag .replace ("-" , "_" )
88+ elif platform .system () == "Darwin" :
89+ # For explanation of Mac platform tags, see:
90+ # http://lepture.com/en/2014/python-on-a-hard-wheel
91+ platform_tag = ("macosx_10_6_intel"
92+ ".macosx_10_9_intel.macosx_10_9_x86_64"
93+ ".macosx_10_10_intel.macosx_10_10_x86_64" )
10594 tag = (tag [0 ], tag [1 ], platform_tag )
10695 return tag
10796
97+ # Overwrite bdist_wheel command
10898 cmdclass ["bdist_wheel" ] = custom_bdist_wheel
10999
110100
111101def main ():
112102 setup (
113- distclass = BinaryDistribution ,
103+ distclass = Distribution ,
114104 cmdclass = cmdclass ,
115105 name = "cefpython3" , # No spaces here, so that it works with deb pkg
116106 version = "{{VERSION}}" ,
117107 description = "GUI toolkit for embedding a Chromium widget"
118108 " in desktop applications" ,
109+ long_description = "CEF Python is an open source project founded"
110+ " by Czarek Tomczak in 2012 to provide python"
111+ " bindings for the Chromium Embedded Framework."
112+ " Examples of embedding CEF browser are available"
113+ " for many popular GUI toolkits including:"
114+ " wxPython, PyQt, PySide, Kivy, Panda3D, PyGTK,"
115+ " PyGObject, PyGame/PyOpenGL and PyWin32.\n \n "
116+ "There are many use cases for CEF. You can embed"
117+ " a web browser control based on Chromium with"
118+ " great HTML 5 support. You can use it to create"
119+ " a HTML 5 based GUI in an application, this can"
120+ " act as a replacement for standard GUI toolkits"
121+ " like wxWidgets, Qt or GTK. You can render web"
122+ " content off-screen in application that use custom"
123+ " drawing frameworks. You can use it for automated"
124+ " testing of existing applications. You can use it"
125+ " for web scraping or as a web crawler, or other"
126+ " kind of internet bots.\n \n "
127+ "Project website:\n "
128+ "https://github.com/cztomczak/cefpython" ,
119129 license = "BSD 3-clause" ,
120130 author = "Czarek Tomczak" ,
121131 author_email = "czarek.tomczak@@gmail.com" ,
0 commit comments