mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-11-04 09:47:30 +03:00 
			
		
		
		
	fix(ci): handle other pg_config options required by setup.py
This commit is contained in:
		
							parent
							
								
									bb52bcf769
								
							
						
					
					
						commit
						a8765121d9
					
				| 
						 | 
					@ -39,11 +39,18 @@ def _main() -> None:
 | 
				
			||||||
            raise ScriptError(f"libpq library not found: {f}")
 | 
					            raise ScriptError(f"libpq library not found: {f}")
 | 
				
			||||||
        print(vcpkg_platform_root.joinpath("lib"))
 | 
					        print(vcpkg_platform_root.joinpath("lib"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    elif args.includedir:
 | 
					    elif args.includedir or args.includedir_server:
 | 
				
			||||||
 | 
					        # NOTE: on linux, the includedir-server dir contains pg_config.h
 | 
				
			||||||
 | 
					        # which we need because it includes the PG_VERSION_NUM macro.
 | 
				
			||||||
 | 
					        # In the vcpkg directory this file is in the includedir directory,
 | 
				
			||||||
 | 
					        # therefore we return the same value.
 | 
				
			||||||
        if not (d := vcpkg_platform_root / "include/libpq").is_dir():
 | 
					        if not (d := vcpkg_platform_root / "include/libpq").is_dir():
 | 
				
			||||||
            raise ScriptError(f"libpq include directory not found: {d}")
 | 
					            raise ScriptError(f"libpq include directory not found: {d}")
 | 
				
			||||||
        print(vcpkg_platform_root.joinpath("include"))
 | 
					        print(vcpkg_platform_root.joinpath("include"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    elif args.cppflags or args.ldflags:
 | 
				
			||||||
 | 
					        print("")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        raise ScriptError("command not handled")
 | 
					        raise ScriptError("command not handled")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -63,6 +70,21 @@ def parse_cmdline() -> Namespace:
 | 
				
			||||||
        action="store_true",
 | 
					        action="store_true",
 | 
				
			||||||
        help="show location of C header files of the client interfaces",
 | 
					        help="show location of C header files of the client interfaces",
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					    g.add_argument(
 | 
				
			||||||
 | 
					        "--includedir-server",
 | 
				
			||||||
 | 
					        action="store_true",
 | 
				
			||||||
 | 
					        help="show location of C header files for the server",
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					    g.add_argument(
 | 
				
			||||||
 | 
					        "--cppflags",
 | 
				
			||||||
 | 
					        action="store_true",
 | 
				
			||||||
 | 
					        help="(dummy) show CPPFLAGS value used when PostgreSQL was built",
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					    g.add_argument(
 | 
				
			||||||
 | 
					        "--ldflags",
 | 
				
			||||||
 | 
					        action="store_true",
 | 
				
			||||||
 | 
					        help="(dummy) show LDFLAGS value used when PostgreSQL was built",
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
    opt = parser.parse_args()
 | 
					    opt = parser.parse_args()
 | 
				
			||||||
    return opt
 | 
					    return opt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user