singer-io/tap-postgres

Wrong psycopg2 version

Opened this issue · 1 comments

Description of change

Hi, I was looking at the last commit 'Revert "Bump python 396 (#130)" (#131)' and I have noticed that on the circleCI config.yml psycopg2==2.8.4 is used but on the setup.py file psycopg2==2.7.4 is used. I think it was a typo.

I guess due to this the pip installation is failing with the below error:

Running psycopg2-2.7.4/setup.py -q bdist_egg --dist-dir /var/folders/0r/88_3g8ls3t57ryyqx6vqxzfm0000gn/T/easy_install-bsmaos35/psycopg2-2.7.4/egg-dist-tmp-pt3w40k6
psycopg/psycopgmodule.c:685:18: error: incomplete definition of type 'struct _is'
    while (interp->next)
           ~~~~~~^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
       ^
psycopg/psycopgmodule.c:686:24: error: incomplete definition of type 'struct _is'
        interp = interp->next;
                 ~~~~~~^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
       ^
2 errors generated.

It appears you are missing some prerequisite to build the package from source.

You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.

For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
error: Setup script exited with error: command 'clang' failed with exit status 1

I have update the psycopg2 version in setup.py with latest version [2.9.3], it worked fine, but got other issue for mac osx which is mentioned below:

error: Setup script exited with error: SandboxViolation: mkdir('/private/var/root/Library/Caches/com.apple.python/private', 511) {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.

It worked for psycopg==2.9.3 and was failing for psycopg==2.7.3 and psycopg==2.8.4 as well, I used python 3.8.2.

Setup.py

url='https://singer.io',
      classifiers=['Programming Language :: Python :: 3 :: Only'],
      install_requires=[
          'singer-python==5.3.1',
          'psycopg2==2.9.3',
          'strict-rfc3339==0.7',
      ],
      extras_require={