text: import setuptools
  import os
  import sipconfig
  import sys
  
  # The name of the SIP build file generated by SIP and used by the build
  # system.
  build_file = "hoverboard_api.sbf"
  build_dir = "./build/"
  
  # Get the SIP configuration information.
  config = sipconfig.Configuration()
  
  
  #build the cpp library
  os.system(" ".join(["make", "-C", "./src", "clean"]))
  os.system(" ".join(["make", "-C", "./src"]))
  
  # Create the build directory
  os.system(" ".join(["mkdir", "-p", build_dir]))
  
  # Run SIP to generate the code.
  os.system(" ".join([config.sip_bin, "-c", build_dir, "-b", build_dir+build_file, "./sip/hoverboard_api.sip"]))
  
  # Create the Makefile.
  makefile = sipconfig.SIPModuleMakefile(config, build_file, dir=build_dir)
  
  # Add the library we are wrapping.  The name doesn't include any platform
  # specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the
  # ".dll" extension on Windows).
  makefile.extra_lib_dirs = ["../src/", "/usr/local/lib"]
  makefile.extra_libs = ["hoverboardapi"]
  makefile.extra_include_dirs = ["../src/"]
  makefile.extra_cxxflags=["-std=c++11"]
  # Generate the Makefile itself.
  makefile.generate()
  
  
  os.system(" ".join(["make", "-C", "./build"]))
  os.system(" ".join(["cp", "./build/hoverboard_api.so", "./"]))
  
  
  setuptools.setup(
       name='hoverboard_api',
       version='0.1',
       packages=['.'],
       package_data={'': ['hoverboard_api.so']},
       #install_requires=[
       #     'sip==4.19.6',
       #],
       author="Jonathan Piat",
       author_email="piat.jonathan@gmail.com",
       description="A package to control a hoverboard",
       url="",
       classifiers=[
           "Programming Language :: Python :: 3",
           "License :: MIT",
           "Operating System :: Linux",
       ],
  
   )
  
  
  #if sys.argv[1] == "bdist_wheel":
  #	os.system(" ".join(["mkdir", "-p", "../wheels"]))
  #	os.system(" ".join(["cp", "./dist/*.whl", "../wheels"]))
  