diff --git a/recipes/libpq/meta.yaml b/recipes/libpq/meta.yaml new file mode 100644 index 0000000000000..a9baa6afc561f --- /dev/null +++ b/recipes/libpq/meta.yaml @@ -0,0 +1,54 @@ +{% set version = "9.5.3" %} + +package: + name: libpq + version: {{ version }} + +build: + number: 0 + skip: True # [win] + # features: + # - vc9 # [win and py27] + # - vc10 # [win and py34] + # - vc14 # [win and py35] + always_include_files: + - lib/libpq.so.5.8 # [linux] + - lib/libpq.so.5 # [linux] + - lib/libpq.so # [linux] + - lib/libpq.5.8.dylib # [osx] + - lib/libpq.5.dylib # [osx] + - lib/libpq.dylib # [osx] + - bin/pg_config # [unix] + - Library/bin/libpq.dll # [win] + - Library/bin/pg_config.exe # [win] + +requirements: + build: + # - vc 9 # [win and py27] + # - vc 10 # [win and py34] + # - vc 14 # [win and py35] + - postgresql {{ version }} + # run: + # - vc 9 # [win and py27] + # - vc 10 # [win and py34] + # - vc 14 # [win and py35] + +test: + commands: + - pg_config + - test -f $PREFIX/lib/libpq.so.5.8 # [linux] + - test -f $PREFIX/lib/libpq.so.5 # [linux] + - test -f $PREFIX/lib/libpq.so # [linux] + - test -f $PREFIX/lib/libpq.5.8.dylib # [osx] + - test -f $PREFIX/lib/libpq.5.dylib # [osx] + - test -f $PREFIX/lib/libpq.dylib # [osx] + +about: + home: http://www.postgresql.org/ + license: PostgreSQL license (http://www.postgresql.org/about/licence/) + summary: The postgres runtime libraries and utilities (not the server itself) + +extra: + recipe-maintainers: + - msarahan + - ocefpaf diff --git a/recipes/psycopg2/bld.bat b/recipes/psycopg2/bld.bat new file mode 100644 index 0000000000000..c40a9bbeff7d6 --- /dev/null +++ b/recipes/psycopg2/bld.bat @@ -0,0 +1,2 @@ +"%PYTHON%" setup.py install +if errorlevel 1 exit 1 diff --git a/recipes/psycopg2/build.sh b/recipes/psycopg2/build.sh new file mode 100644 index 0000000000000..0c8a261286b90 --- /dev/null +++ b/recipes/psycopg2/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -lssl" + +$PYTHON setup.py install + +if [[ `uname` == 'Darwin' ]]; then + PG_LIB=$(pg_config --libdir) + for LIBRARY in `find ${SP_DIR}/${PKG_NAME} -name "*.so"`; + do + install_name_tool -change libssl.1.0.0.dylib @rpath/libssl.1.0.0.dylib $LIBRARY + install_name_tool -change libcrypto.1.0.0.dylib @rpath/libcrypto.1.0.0.dylib $LIBRARY + done +fi diff --git a/recipes/psycopg2/have_openssl.patch b/recipes/psycopg2/have_openssl.patch new file mode 100755 index 0000000000000..50a94228ff896 --- /dev/null +++ b/recipes/psycopg2/have_openssl.patch @@ -0,0 +1,13 @@ +diff --git setup.cfg setup.cfg +index 90a47dd..1057dc1 100644 +--- setup.cfg ++++ setup.cfg +@@ -21,7 +21,7 @@ use_pydatetime=1 + # For Windows only: + # Set to 1 if the PostgreSQL library was built with OpenSSL. + # Required to link in OpenSSL libraries and dependencies. +-have_ssl=0 ++have_ssl=1 + + # Statically link against the postgresql client library. + #static_libpq=1 diff --git a/recipes/psycopg2/meta.yaml b/recipes/psycopg2/meta.yaml new file mode 100644 index 0000000000000..60baf24199c2b --- /dev/null +++ b/recipes/psycopg2/meta.yaml @@ -0,0 +1,43 @@ +{% set version = "2.6.1" %} + +package: + name: psycopg2 + version: {{ version }} + +source: + fn: psycopg2-{{ version }}.tar.gz + url: https://pypi.python.org/packages/source/p/psycopg2/psycopg2-{{ version }}.tar.gz + md5: 842b44f8c95517ed5b792081a2370da1 + patches: + - have_openssl.patch + +build: + number: 0 + # FIXME: until we solve the postgresql package. + skip: True # [win] + +requirements: + build: + - python + - postgresql + - openssl 1.0.* + run: + # libpq is a repackaging of only the library to connect to postgres + - libpq + - python + - openssl 1.0.* + +test: + imports: + - psycopg2 + - psycopg2._psycopg + +about: + home: http://initd.org/psycopg/ + license: LGPL, BSD-like, ZPL + summary: Python-PostgreSQL Database Adapter + +extra: + recipe-maintainers: + - msarahan + - ocefpaf