2021-01-05 02:13:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								""" Setup file to install the GTSAM package. """  
						 
					
						
							
								
									
										
										
										
											2020-08-18 23:03:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-02-21 05:05:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								from  setuptools  import  setup ,  find_namespace_packages ,  Distribution  
						 
					
						
							
								
									
										
										
										
											2019-02-08 19:57:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-09-06 00:04:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								packages  =  find_namespace_packages (  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    where = " . " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    exclude = ( ' build ' ,  ' build.* ' ,  ' CMakeFiles ' ,  ' CMakeFiles.* ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								             ' gtsam.notebooks ' ,  ' *.preamble ' ,  ' *.specializations ' ,  ' dist ' ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-18 23:03:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								print ( " PACKAGES:  " ,  packages )  
						 
					
						
							
								
									
										
										
										
											2020-08-31 21:51:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-06-25 07:39:49 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								package_data  =  {  
						 
					
						
							
								
									
										
										
										
											2020-08-18 23:03:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ' ' :  [ 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 02:13:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        " ./*.so " , 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-08 07:25:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        " ./*.dll " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " ./*.pyd " , 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-25 00:40:11 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        " *.pyi " ,  " **/*.pyi " ,   # Add the type hints 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-18 23:03:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ] 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-25 07:39:49 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# Cleaner to read in the contents rather than copy them over.  
						 
					
						
							
								
									
										
										
										
											2021-01-05 02:13:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								readme_contents  =  open ( " $ {GTSAM_SOURCE_DIR} /README.md " ) . read ( )  
						 
					
						
							
								
									
										
										
										
											2020-06-25 07:39:49 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-01 00:42:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# The cibuildwheel tool won't recognize a wheel as platform-dependent unless the ext_modules option is defined in setup.py. This is used to define C/C++ source files that need to be built for the wheel.  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# However, we pre-build our C++ files. Thus, we force cibuildwheel to think that there are ext_modules defined by overwriting the has_ext_modules() function.  
						 
					
						
							
								
									
										
										
										
											2025-02-21 05:05:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								class  BinaryDistribution ( Distribution ) :  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  has_ext_modules ( foo ) : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  True 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-02-08 19:57:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								setup (  
						 
					
						
							
								
									
										
										
										
											2025-02-21 06:28:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    name = ' $ {SETUP_NAME} ' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-08 19:57:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    description = ' Georgia Tech Smoothing And Mapping library ' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-30 05:13:19 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    url = ' https://gtsam.org/ ' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-08 19:57:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    version = ' $ {GTSAM_VERSION_STRING} ' ,   # https://www.python.org/dev/peps/pep-0440/ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-30 05:13:19 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    author = ' Frank Dellaert et. al. ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    author_email = ' frank.dellaert@gtsam.org ' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-08 19:57:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    license = ' Simplified BSD license ' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-11 22:54:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    keywords = ' slam sam robotics localization mapping optimization ' , 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-24 10:01:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    long_description_content_type = ' text/markdown ' , 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-25 07:39:49 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    long_description = readme_contents , 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-08 19:57:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # https://pypi.org/pypi?%3Aaction=list_classifiers 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    classifiers = [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ' Development Status :: 5 - Production/Stable ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ' Intended Audience :: Education ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ' Intended Audience :: Developers ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ' Intended Audience :: Science/Research ' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-20 17:03:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ' Operating System :: MacOS ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ' Operating System :: Microsoft :: Windows ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ' Operating System :: POSIX ' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-08 19:57:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ' License :: OSI Approved :: BSD License ' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-20 17:03:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ' Programming Language :: Python :: 3 ' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-08 19:57:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ] , 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-08 23:15:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    packages = packages , 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 02:13:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    include_package_data = True , 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-25 07:39:49 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    package_data = package_data , 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-21 05:05:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    distclass = BinaryDistribution , 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-18 23:03:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    test_suite = " gtsam.tests " , 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 02:13:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    install_requires = open ( " $ {GTSAM_SOURCE_DIR} /python/requirements.txt " ) . readlines ( ) , 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-18 23:03:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    zip_safe = False , 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-08 19:57:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								)