setup.py
def build_cmake(self, extension):
        """
        The steps required to build the extension
        """
        self.announce("Preparing the build environment", level=3)
        build_dir = os.path.join(self.build_temp)
        extension_path = os.path.abspath(os.path.dirname(self.get_ext_fullpath(extension.name)))
        os.makedirs(build_dir)
        os.makedirs(extension_path)
        python_version = str(sys.version_info[0]) + "." + str(sys.version_info[1])

        # Now that the necessary directories are created, build
        self.announce("Configuring cmake project", level=3)
        cmake_args = ['-DPYTHON_EXECUTABLE=' + sys.executable,
                      '-DBGS_CORE_STATIC=ON',
                      '-DBGS_PYTHON_SUPPORT=ON',
                      '-DBGS_PYTHON_ONLY=ON',
                      '-DBGS_PYTHON_VERSION=' + python_version]
        if not os.path.exists(self.build_temp):
            os.makedirs(self.build_temp)
        self.spawn(['cmake', '-H'+extension.sourcedir, '-B'+self.build_temp]+ cmake_args)

        self.announce("Building binaries", level=3)
        self.spawn(["cmake", "--build", self.build_temp, 
                    "--config", "Release", '--', '-j8'])

        # Build finished, now copy the files into the copy directory
        # The copy directory is the parent directory of the extension (.pyd)
        self.announce("Moving built python module", level=3)
        bin_dir = build_dir
        self.distribution.bin_dir = bin_dir
        pyd_path = [os.path.join(bin_dir, _pyd) for _pyd in
                    os.listdir(bin_dir) if
                    os.path.isfile(os.path.join(bin_dir, _pyd)) and
                    os.path.splitext(_pyd)[0].startswith(PACKAGE_NAME) and
                    os.path.splitext(_pyd)[1] in [".pyd", ".so"]][0]
        shutil.move(pyd_path, extension_path)

        # After build_ext is run, the following commands will run:
        # 
        # install_lib
        # install_scripts
        # 
        # These commands are subclassed above to avoid pitfalls that
        # setuptools tries to impose when installing these, as it usually
        # wants to build those libs and scripts as well or move them to a
        # different place. See comments above for additional information

        The steps required to build the extension
        
The steps required to build the extension
The steps required to build the extension
def build_cmake(self, extension):
        self.announce("Preparing the build environment", level=3)
        build_dir = os.path.join(self.build_temp)
        extension_path = os.path.abspath(os.path.dirname(self.get_ext_fullpath(extension.name)))
        os.makedirs(build_dir)
        os.makedirs(extension_path)
        python_version = str(sys.version_info[0]) + "." + str(sys.version_info[1])
        self.announce("Configuring cmake project", level=3)
        cmake_args = ['-DPYTHON_EXECUTABLE=' + sys.executable,
                      '-DBGS_CORE_STATIC=ON',
                      '-DBGS_PYTHON_SUPPORT=ON',
                      '-DBGS_PYTHON_ONLY=ON',
                      '-DBGS_PYTHON_VERSION=' + python_version]
        if not os.path.exists(self.build_temp):
            os.makedirs(self.build_temp)
        self.spawn(['cmake', '-H'+extension.sourcedir, '-B'+self.build_temp]+ cmake_args)
        self.announce("Building binaries", level=3)
        self.spawn(["cmake", "--build", self.build_temp, 
                    "--config", "Release", '--', '-j8'])
        self.announce("Moving built python module", level=3)
        bin_dir = build_dir
        self.distribution.bin_dir = bin_dir
        pyd_path = [os.path.join(bin_dir, _pyd) for _pyd in
                    os.listdir(bin_dir) if
                    os.path.isfile(os.path.join(bin_dir, _pyd)) and
                    os.path.splitext(_pyd)[0].startswith(PACKAGE_NAME) and
                    os.path.splitext(_pyd)[1] in [".pyd", ".so"]][0]
        shutil.move(pyd_path, extension_path)
        install_lib
        install_scripts
        These commands are subclassed above to avoid pitfalls that
        setuptools tries to impose when installing these, as it usually
        wants to build those libs and scripts as well or move them to a
        different place. See comments above for additional information
def build_cmake ( self , extension ) : self . announce ( "Preparing the build environment" , level = 3 ) build_dir = os . path . join ( self . build_temp ) extension_path = os . path . abspath ( os . path . dirname ( self . get_ext_fullpath ( extension . name ) ) ) os . makedirs ( build_dir ) os . makedirs ( extension_path ) python_version = str ( sys . version_info [ 0 ] ) + "." + str ( sys . version_info [ 1 ] ) self . announce ( "Configuring cmake project" , level = 3 ) cmake_args = [ '-DPYTHON_EXECUTABLE=' + sys . executable , '-DBGS_CORE_STATIC=ON' , '-DBGS_PYTHON_SUPPORT=ON' , '-DBGS_PYTHON_ONLY=ON' , '-DBGS_PYTHON_VERSION=' + python_version ] if not os . path . exists ( self . build_temp ) : os . makedirs ( self . build_temp ) self . spawn ( [ 'cmake' , '-H' + extension . sourcedir , '-B' + self . build_temp ] + cmake_args ) self . announce ( "Building binaries" , level = 3 ) self . spawn ( [ "cmake" , "--build" , self . build_temp , "--config" , "Release" , '--' , '-j8' ] ) self . announce ( "Moving built python module" , level = 3 ) bin_dir = build_dir self . distribution . bin_dir = bin_dir pyd_path = [ os . path . join ( bin_dir , _pyd ) for _pyd in os . listdir ( bin_dir ) if os . path . isfile ( os . path . join ( bin_dir , _pyd ) ) and os . path . splitext ( _pyd ) [ 0 ] . startswith ( PACKAGE_NAME ) and os . path . splitext ( _pyd ) [ 1 ] in [ ".pyd" , ".so" ] ] [ 0 ] shutil . move ( pyd_path , extension_path )
The steps required to build the extension
The steps required to build the extension
"""
        The steps required to build the extension
        """ # Now that the necessary directories are created, build # Build finished, now copy the files into the copy directory # The copy directory is the parent directory of the extension (.pyd) # After build_ext is run, the following commands will run: #  # install_lib # install_scripts #  # These commands are subclassed above to avoid pitfalls that # setuptools tries to impose when installing these, as it usually # wants to build those libs and scripts as well or move them to a # different place. See comments above for additional information
self
extension