from sys import executable

setuptools_import_error_message = """setuptools is not installed for """ + executable + """
Please follow this link for installing instructions :
https://pypi.python.org/pypi/setuptools
make sure you use \"""" + executable + """\" during the installation"""

try:
    from setuptools import setup, Distribution
except ImportError:
    raise ImportError(setuptools_import_error_message)

from os.path import join as pjoin
from os.path import dirname

# Utility function to read the README file.
# Used for the long_description.  It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
    return open(pjoin(dirname(__file__), fname)).read()


class BinaryDistribution(Distribution):
  def has_ext_modules(foo):
      return True


setup(
    name='ORTOOLS_PYTHON_VERSION',
    version='VVVV',
    packages=[
        'ortools',
        'ortools.algorithms',
        'ortools.constraint_solver',
        'ortools.data',
        'ortools.graph',
        'ortools.linear_solver',
        'ortools.sat',
        'ortools.sat.python',
        'ortools.util',
    ],
    install_requires = [
        'protobuf >= PROTOBUF_TAG',
        'six >= 1.10',
    ],
    package_data = {
        'ortools.constraint_solver' : ['_pywrapcp.dll'],
        'ortools.data' : ['_pywraprcpsp.dll'],
        'ortools.linear_solver' : ['_pywraplp.dll'],
        'ortools.graph' : ['_pywrapgraph.dll'],
        'ortools.algorithms' : ['_pywrapknapsack_solver.dll'],
        'ortools.sat' : ['_pywrapsat.dll'],
        DELETEWIN 'ortools' : ['libortools.DLL']
    },
    include_package_data=True,
    license='Apache 2.0',
    author = 'Google Inc',
    author_email = 'lperron@google.com',
    description = 'Google OR-Tools python libraries and modules',
    keywords = ('operations research, constraint programming, ' +
                'linear programming,' + 'flow algorithms,' +
                'python'),
    url = 'https://developers.google.com/optimization/',
    download_url = 'https://github.com/google/or-tools/releases',
    classifiers = [
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Topic :: Office/Business :: Scheduling',
        'Topic :: Scientific/Engineering',
        'Topic :: Scientific/Engineering :: Mathematics',
        'Topic :: Software Development :: Libraries :: Python Modules'],
    distclass=BinaryDistribution,
    long_description = read('README.txt'),
)

@@ -19,16 +19,78 @@
 ecutable
+%0Afrom os.path import join as pjoin%0Afrom os.path import dirname
 %0A%0Asetupt
@@ -474,71 +474,8 @@
 e)%0A%0A
-from os.path import join as pjoin%0Afrom os.path import dirname%0A%0A
 # Ut
@@ -768,17 +768,16 @@
 read()%0A%0A
-%0A
 class Bi
@@ -808,16 +808,62 @@
 ution):%0A
+    def is_pure(self):%0A        return False%0A  
   def ha
@@ -880,14 +880,17 @@
 les(
-foo
+self
 ):%0A
+  
     
@@ -904,16 +904,213 @@
 n True%0A%0A
+from setuptools.command.install import install%0Aclass InstallPlatlib(install):%0A    def finalize_options(self):%0A        install.finalize_options(self)%0A        self.install_lib = self.install_platlib%0A
 %0Asetup(%0A
@@ -1451,19 +1451,17 @@
 requires
- = 
+=
 %5B%0A      
@@ -1536,19 +1536,17 @@
 age_data
- = 
+=
 %7B%0A      
@@ -1974,19 +1974,17 @@
   author
- = 
+=
 'Google 
@@ -2005,19 +2005,17 @@
 or_email
- = 
+=
 'lperron
@@ -2043,19 +2043,17 @@
 cription
- = 
+=
 'Google 
@@ -2104,19 +2104,17 @@
 keywords
- = 
+=
 ('operat
@@ -2170,18 +2170,16 @@
         
- 
- 
 'linear 
@@ -2229,18 +2229,16 @@
         
-  
 'python'
@@ -2247,19 +2247,17 @@
 %0A    url
- = 
+=
 'https:/
@@ -2311,19 +2311,17 @@
 load_url
- = 
+=
 'https:/
@@ -2374,19 +2374,17 @@
 ssifiers
- = 
+=
 %5B%0A      
@@ -3182,16 +3182,58 @@
 bution,%0A
+    cmdclass=%7B'install': InstallPlatlib%7D,%0A
     long
@@ -3244,19 +3244,17 @@
 cription
- = 
+=
 read('RE

Fix wheel pure lib generation (#616)