Bug 193122 - databases/py-psycopg2: Update to allow multiple version installation
Summary: databases/py-psycopg2: Update to allow multiple version installation
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-29 14:50 UTC by Robert Kruus
Modified: 2015-02-24 10:56 UTC (History)
2 users (show)

See Also:


Attachments
py-psycopg2 ports Makefile patch (529 bytes, patch)
2014-08-29 14:50 UTC, Robert Kruus
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Kruus 2014-08-29 14:50:17 UTC
Created attachment 146485 [details]
py-psycopg2 ports Makefile patch

The current port installs to a fixed DOCSDIR and EXAMPLESDIR.  Patch allows installing for more than one version of python (${PKGNAMEPREFIX}${PORTNAME}).
Comment 1 Carlo Strub freebsd_committer freebsd_triage 2014-08-29 19:48:10 UTC
Please provide us with redports.org or Poudriere logs that confirm your patch is working fine.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2014-08-29 22:46:56 UTC
Robert, the following two features should help achieve what is needed:

- 'concurrent' feature for USE_PYTHON (Mk/Uses/python.mk)
- USES=uniquefiles:dirs feature (Mk/Uses/uniquefiles.mk)
Comment 3 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2015-02-22 10:38:27 UTC
Over to maintainer
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2015-02-23 07:12:13 UTC
(In reply to Robert Kruus from comment #0)

I think this port should support concurrent installation right now. Would you please update ports tree and try again? Thanks!
Comment 5 Robert Kruus 2015-02-23 15:26:51 UTC
(In reply to Sunpoet Po-Chuan Hsieh from comment #4)
I had to add uniquefiles:dirs to USES to allow for concurrent install when I updated to 2.5.5 otherwise the examples and licenses directories still conflict.
Comment 6 Po-Chuan Hsieh freebsd_committer freebsd_triage 2015-02-23 16:55:32 UTC
(In reply to Robert Kruus from comment #5)

I cannot reproduce your problem.

% cd /usr/ports/databases/py-psycopg2/
% svn st -v
            379615   379234 sunpoet      .
            379615   379234 sunpoet      Makefile
            379615   379234 sunpoet      distinfo
            379615   341308 rm           pkg-descr

% ls -la /usr/ports/packages/All/py*psycopg2*
-rw-r--r--  1 root  wheel  292336 Feb 24 00:42:08 2015 /usr/ports/packages/All/py27-psycopg2-2.5.5.txz
-rw-r--r--  1 root  wheel  302964 Feb 24 00:41:39 2015 /usr/ports/packages/All/py34-psycopg2-2.5.5.txz

% pkg info -x psycopg2
py27-psycopg2-2.5.5
py34-psycopg2-2.5.5

According to the packages for python 2.7 and 3.4, the files are installed to:
1. python2.7:
- license: /usr/local/share/licenses/py27-psycopg2-2.5.5/LICENSE
- docs: /usr/local/share/doc/py27-psycopg2/
- examples: /usr/local/share/examples/py27-psycopg2/
2. python3.4:
- license: /usr/local/share/licenses/py34-psycopg2-2.5.5/LICENSE
- docs: /usr/local/share/doc/py34-psycopg2/
- examples: /usr/local/share/examples/py34-psycopg2/

Could you please show me the directories used by license, docs and examples?
Comment 7 Robert Kruus 2015-02-23 17:54:01 UTC
(In reply to Sunpoet Po-Chuan Hsieh from comment #6)
Seems to work now, didn't work last week when doing portmaster -a and the last update to the port.
It would build the default python python version (2.7), but not install with the duplicate file error.

Doing make clean deinstall install in the ports tree works for different versions.
Doing a specific re-install:
    portmaster py27-psycopg2
    portmaster py34-psycopg2 (setting PYTHON_VERSION)
works fine now too.

I will keep an eye what might be happening with portmaster -a when the next port version/revision comes out.



pkg info -x psycopg2
py27-psycopg2-2.5.5
py34-psycopg2-2.5.5

 pkg list py27-psycopg2-2.5.5 | grep -e "/share/doc" -e "/share/examples" -e "/share/licenses" | xargs dirname | uniq
/usr/local/share/doc/py27-psycopg2
/usr/local/share/examples/py27-psycopg2
/usr/local/share/licenses/py27-psycopg2-2.5.5


pkg list py34-psycopg2-2.5.5 | grep -e "/share/doc" -e "/share/examples" -e "/share/licenses" | xargs dirname | uniq
/usr/local/share/doc/py34-psycopg2
/usr/local/share/examples/py34-psycopg2
/usr/local/share/licenses/py34-psycopg2-2.5.5
Comment 8 Po-Chuan Hsieh freebsd_committer freebsd_triage 2015-02-24 10:56:15 UTC
Submitter confirmed that databases/py-psycopg2 supports concurrent installation.