mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-11-04 01:37:31 +03:00 
			
		
		
		
	Define openssl and libpq versions in vars in appveyor build
This commit is contained in:
		
							parent
							
								
									4845393c15
								
							
						
					
					
						commit
						8cc0d06e65
					
				| 
						 | 
					@ -22,6 +22,9 @@ environment:
 | 
				
			||||||
      - {PYVER: "36", PYTHON_ARCH: "32"}
 | 
					      - {PYVER: "36", PYTHON_ARCH: "32"}
 | 
				
			||||||
      - {PYVER: "36", PYTHON_ARCH: "64"}
 | 
					      - {PYVER: "36", PYTHON_ARCH: "64"}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    OPENSSL_VERSION: "1_0_2m"
 | 
				
			||||||
 | 
					    POSTGRES_VERSION: "10_1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    PSYCOPG2_TESTDB: psycopg2_test
 | 
					    PSYCOPG2_TESTDB: psycopg2_test
 | 
				
			||||||
    PSYCOPG2_TESTDB_USER: postgres
 | 
					    PSYCOPG2_TESTDB_USER: postgres
 | 
				
			||||||
    PSYCOPG2_TESTDB_PASSWORD: Password12!
 | 
					    PSYCOPG2_TESTDB_PASSWORD: Password12!
 | 
				
			||||||
| 
						 | 
					@ -139,8 +142,8 @@ install:
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    # Download OpenSSL source
 | 
					    # Download OpenSSL source
 | 
				
			||||||
    - CD C:\Others
 | 
					    - CD C:\Others
 | 
				
			||||||
    - IF NOT EXIST OpenSSL_1_0_2m.zip (
 | 
					    - IF NOT EXIST OpenSSL_%OPENSSL_VERSION%.zip (
 | 
				
			||||||
        curl -fsSL -o OpenSSL_1_0_2m.zip https://github.com/openssl/openssl/archive/OpenSSL_1_0_2m.zip
 | 
					        curl -fsSL -o OpenSSL_%OPENSSL_VERSION%.zip https://github.com/openssl/openssl/archive/OpenSSL_%OPENSSL_VERSION%.zip
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # To use OpenSSL >= 1.1.0, both libpq and psycopg build environments have
 | 
					    # To use OpenSSL >= 1.1.0, both libpq and psycopg build environments have
 | 
				
			||||||
| 
						 | 
					@ -152,15 +155,15 @@ install:
 | 
				
			||||||
    #    - nmake build_libs install_dev
 | 
					    #    - nmake build_libs install_dev
 | 
				
			||||||
    - IF NOT EXIST %OPENSSLTOP%\lib\ssleay32.lib (
 | 
					    - IF NOT EXIST %OPENSSLTOP%\lib\ssleay32.lib (
 | 
				
			||||||
        CD %BUILD_DIR% &&
 | 
					        CD %BUILD_DIR% &&
 | 
				
			||||||
        7z x C:\Others\OpenSSL_1_0_2m.zip &&
 | 
					        7z x C:\Others\OpenSSL_%OPENSSL_VERSION%.zip &&
 | 
				
			||||||
        CD openssl-OpenSSL_1_0_2m &&
 | 
					        CD openssl-OpenSSL_%OPENSSL_VERSION% &&
 | 
				
			||||||
        perl Configure %TARGET% no-asm no-shared no-zlib --prefix=%OPENSSLTOP% --openssldir=%OPENSSLTOP% &&
 | 
					        perl Configure %TARGET% no-asm no-shared no-zlib --prefix=%OPENSSLTOP% --openssldir=%OPENSSLTOP% &&
 | 
				
			||||||
        CALL ms\%DO% &&
 | 
					        CALL ms\%DO% &&
 | 
				
			||||||
        nmake -f ms\nt.mak init headers lib &&
 | 
					        nmake -f ms\nt.mak init headers lib &&
 | 
				
			||||||
        COPY inc32\openssl\*.h %OPENSSLTOP%\include\openssl &&
 | 
					        COPY inc32\openssl\*.h %OPENSSLTOP%\include\openssl &&
 | 
				
			||||||
        COPY out32\*.lib %OPENSSLTOP%\lib &&
 | 
					        COPY out32\*.lib %OPENSSLTOP%\lib &&
 | 
				
			||||||
        CD %BASE_DIR% &&
 | 
					        CD %BASE_DIR% &&
 | 
				
			||||||
        RMDIR /S /Q %BUILD_DIR%\openssl-OpenSSL_1_0_2m
 | 
					        RMDIR /S /Q %BUILD_DIR%\openssl-OpenSSL_%OPENSSL_VERSION%
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Setup directories for building PostgreSQL librarires
 | 
					    # Setup directories for building PostgreSQL librarires
 | 
				
			||||||
| 
						 | 
					@ -174,8 +177,8 @@ install:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Download PostgreSQL source
 | 
					    # Download PostgreSQL source
 | 
				
			||||||
    - CD C:\Others
 | 
					    - CD C:\Others
 | 
				
			||||||
    - IF NOT EXIST postgres-REL_10_1.zip (
 | 
					    - IF NOT EXIST postgres-REL_%POSTGRES_VERSION%.zip (
 | 
				
			||||||
        curl -fsSL -o postgres-REL_10_1.zip https://github.com/postgres/postgres/archive/REL_10_1.zip
 | 
					        curl -fsSL -o postgres-REL_%POSTGRES_VERSION%.zip https://github.com/postgres/postgres/archive/REL_%POSTGRES_VERSION%.zip
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Setup build config file (config.pl)
 | 
					    # Setup build config file (config.pl)
 | 
				
			||||||
| 
						 | 
					@ -186,11 +189,11 @@ install:
 | 
				
			||||||
    # Prepare local include directory for building from
 | 
					    # Prepare local include directory for building from
 | 
				
			||||||
    # Build pg_config in place
 | 
					    # Build pg_config in place
 | 
				
			||||||
    # NOTE: Cannot set and use the same variable inside an IF
 | 
					    # NOTE: Cannot set and use the same variable inside an IF
 | 
				
			||||||
    - SET PGBUILD=%BUILD_DIR%\postgres-REL_10_1
 | 
					    - SET PGBUILD=%BUILD_DIR%\postgres-REL_%POSTGRES_VERSION%
 | 
				
			||||||
    - IF NOT EXIST %PGTOP%\lib\libpq.lib (
 | 
					    - IF NOT EXIST %PGTOP%\lib\libpq.lib (
 | 
				
			||||||
        CD %BUILD_DIR% &&
 | 
					        CD %BUILD_DIR% &&
 | 
				
			||||||
        7z x C:\Others\postgres-REL_10_1.zip &&
 | 
					        7z x C:\Others\postgres-REL_%POSTGRES_VERSION%.zip &&
 | 
				
			||||||
        CD postgres-REL_10_1\src\tools\msvc &&
 | 
					        CD postgres-REL_%POSTGRES_VERSION%\src\tools\msvc &&
 | 
				
			||||||
        ECHO $config-^>{ldap} = 0; > config.pl &&
 | 
					        ECHO $config-^>{ldap} = 0; > config.pl &&
 | 
				
			||||||
        ECHO $config-^>{openssl} = "%OPENSSLTOP:\=\\%"; >> config.pl &&
 | 
					        ECHO $config-^>{openssl} = "%OPENSSLTOP:\=\\%"; >> config.pl &&
 | 
				
			||||||
        ECHO.>> config.pl &&
 | 
					        ECHO.>> config.pl &&
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user