Marc Balmer wrote:

Python and Python ports have been changed to use 2.5 as the default
version.  This brings Zope users into trouble:

Maybe I must use a bit more drastic verbiage: Zope is not usable anymore. For database adapters like py-psycopg or ldap adapters like zope-ldapuserfolder, needed packages are no longer built.

About the only feedback I got was from Nikolay, who thinks my fix is not nice. Marc Espie did not explain why @option no-default-conflict does not work anymore for FLAVORS (and this is the reason why I had to change the name stem). And I asked him several times.

I need to move forward with this in some or the other way quite soon, because I run my servers on -current, to catch problems like this one
early on and not at release time.

If I can't get an OK for this or if there is no better proposal (just saying this is not nice is not an alternative, imo ;) then I will have to move Zope and friends to an internal CVS. That would leave Zope in OpenBSD unmaintained (and unusable), so this is definitely _THE LAST RESORT ONLY_.... But since naddy already mentioned that Zope and Plone should go down the curbe, I will eventually do it.

Everyone interested in Zope (and Plone), please take a look at this. I am totally open for better solutions.


Zope still requires Python 2.4 to run.  While it is no problem to
install Python 2.4 and Python 2.5 in parallel, some Python modules that
are needed by Zope only get built for Python 2.5.

For example, www/zope-ldapuserfolder set MODULES=www/zope and a
RUN_DEPENDS on databases/py-ldap.  Of course the zope, py-ldap, and
zope-ldapuserfolder packages are build and the package tools will not
complain.  _But_ py-ldap gets built using Python 2.5 and the other
two using Python 2.4 (as is needed by Zope).  And then, when you
use the software you will notice that the py-ldap package installed
it's files into /usr/local/lib/python2.5/... whereas the other packages
installed the files under /usr/local/lib/python2.4.

The solution is surprisingly simple:

- Add a python2.4 PSEUDO_FLAVOR for databases/py-ldap.  We choose to
  alter the package name to py24-ldap so it does not conflict with
  py-ldap (as flavors seem to conflict by default).
- Factor out Example code from py-ldap into a subpackage
  py-ldap-examples.
- Have www/zope-ldapuserfolder depend on py24-ldap instead of py-ldap

We will have to use this scheme for some more packages, like database
adapters and such.

ok?

Index: databases/py-ldap/Makefile
===================================================================
RCS file: /cvs/ports/databases/py-ldap/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- databases/py-ldap/Makefile  8 Oct 2007 08:22:39 -0000       1.15
+++ databases/py-ldap/Makefile  2 Nov 2007 15:26:53 -0000
@@ -1,12 +1,15 @@
 # $OpenBSD: Makefile,v 1.15 2007/10/08 08:22:39 steven Exp $
-SHARED_ONLY= Yes
+SHARED_ONLY=           Yes
-COMMENT= LDAP client API for Python
+COMMENT-main=          LDAP client API for Python
+COMMENT-examples=      example programs for the LDAP client API for Python
+
+V=                     2.2.0
+DISTNAME=              python-ldap-${V}
+PKGNAME-main=          py-ldap-${V}p1
+FULLPKGNAME-examples=  py-ldap-examples-${V}
-V= 2.2.0
-DISTNAME=      python-ldap-${V}
-PKGNAME=       py-ldap-${V}p0
 CATEGORIES=    databases
HOMEPAGE= http://python-ldap.sourceforge.net/
@@ -25,6 +28,16 @@
LIB_DEPENDS= ldap_r.>=7,lber.>=7::databases/openldap \
                sasl2.>=2::security/cyrus-sasl2
+
+PSEUDO_FLAVORS=        python2.4       # Needed for Zope, e.g.
+FLAVOR?=
+
+MULTI_PACKAGES=        -main -examples
+
+.if ${FLAVOR:L:Mpython2.4}
+MODPY_VERSION= 2.4
+PKGNAME-main=  py24-ldap-${V}          # To avoid conflicts
+.endif
MODULES= lang/python Index: databases/py-ldap/pkg/DESCR
===================================================================
RCS file: databases/py-ldap/pkg/DESCR
diff -N databases/py-ldap/pkg/DESCR
--- databases/py-ldap/pkg/DESCR 18 Dec 2004 14:28:35 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-python-ldap provides an object-oriented API to access LDAP
-directory servers from Python programs. Mainly it wraps the
-OpenLDAP 2.x libs for that purpose.
-
-Additionally the package contains modules for other LDAP-related
-stuff (e.g. processing LDIF, LDAPURLs, LDAPv3 sub-schema, etc.).
-
-Not included: Direct BER support
-
-Quick usage example:
-    import ldap
-    l = ldap.open("my_ldap_server.my_domain")
-    l.simple_bind_s("","")
-    l.search_s("o=My Organisation, c=AU", ldap.SCOPE_SUBTREE, "objectclass=*")
Index: databases/py-ldap/pkg/DESCR-examples
===================================================================
RCS file: databases/py-ldap/pkg/DESCR-examples
diff -N databases/py-ldap/pkg/DESCR-examples
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ databases/py-ldap/pkg/DESCR-examples        2 Nov 2007 15:26:53 -0000
@@ -0,0 +1,2 @@
+Example programs for the python-ldap API to access LDAP directory servers
+from Python programs.
Index: databases/py-ldap/pkg/DESCR-main
===================================================================
RCS file: databases/py-ldap/pkg/DESCR-main
diff -N databases/py-ldap/pkg/DESCR-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ databases/py-ldap/pkg/DESCR-main    2 Nov 2007 15:26:53 -0000
@@ -0,0 +1,14 @@
+python-ldap provides an object-oriented API to access LDAP
+directory servers from Python programs. Mainly it wraps the
+OpenLDAP 2.x libs for that purpose.
+
+Additionally the package contains modules for other LDAP-related
+stuff (e.g. processing LDIF, LDAPURLs, LDAPv3 sub-schema, etc.).
+
+Not included: Direct BER support
+
+Quick usage example:
+    import ldap
+    l = ldap.open("my_ldap_server.my_domain")
+    l.simple_bind_s("","")
+    l.search_s("o=My Organisation, c=AU", ldap.SCOPE_SUBTREE, "objectclass=*")
Index: databases/py-ldap/pkg/PLIST
===================================================================
RCS file: databases/py-ldap/pkg/PLIST
diff -N databases/py-ldap/pkg/PLIST
--- databases/py-ldap/pkg/PLIST 16 Nov 2006 10:09:56 -0000      1.8
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,76 +0,0 @@
[EMAIL PROTECTED] $OpenBSD: PLIST,v 1.8 2006/11/16 10:09:56 mbalmer Exp $
-lib/python${MODPY_VERSION}/site-packages/_ldap.so
-lib/python${MODPY_VERSION}/site-packages/dsml.py
-lib/python${MODPY_VERSION}/site-packages/dsml.pyc
-lib/python${MODPY_VERSION}/site-packages/dsml.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/
-lib/python${MODPY_VERSION}/site-packages/ldap/__init__.py
-lib/python${MODPY_VERSION}/site-packages/ldap/__init__.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/__init__.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/async.py
-lib/python${MODPY_VERSION}/site-packages/ldap/async.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/async.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/cidict.py
-lib/python${MODPY_VERSION}/site-packages/ldap/cidict.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/cidict.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/controls.py
-lib/python${MODPY_VERSION}/site-packages/ldap/controls.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/controls.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/dn.py
-lib/python${MODPY_VERSION}/site-packages/ldap/dn.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/dn.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/filter.py
-lib/python${MODPY_VERSION}/site-packages/ldap/filter.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/filter.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/functions.py
-lib/python${MODPY_VERSION}/site-packages/ldap/functions.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/functions.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/ldapobject.py
-lib/python${MODPY_VERSION}/site-packages/ldap/ldapobject.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/ldapobject.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/modlist.py
-lib/python${MODPY_VERSION}/site-packages/ldap/modlist.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/modlist.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/sasl.py
-lib/python${MODPY_VERSION}/site-packages/ldap/sasl.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/sasl.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/__init__.py
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/__init__.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/__init__.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/models.py
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/models.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/models.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/subentry.py
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/subentry.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/subentry.pyo
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/tokenizer.py
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/tokenizer.pyc
-lib/python${MODPY_VERSION}/site-packages/ldap/schema/tokenizer.pyo
-lib/python${MODPY_VERSION}/site-packages/ldapurl.py
-lib/python${MODPY_VERSION}/site-packages/ldapurl.pyc
-lib/python${MODPY_VERSION}/site-packages/ldapurl.pyo
-lib/python${MODPY_VERSION}/site-packages/ldif.py
-lib/python${MODPY_VERSION}/site-packages/ldif.pyc
-lib/python${MODPY_VERSION}/site-packages/ldif.pyo
-share/examples/py-ldap/
-share/examples/py-ldap/Demo/
-share/examples/py-ldap/Demo/Lib/
-share/examples/py-ldap/Demo/Lib/ldap/
-share/examples/py-ldap/Demo/Lib/ldap/res/
-share/examples/py-ldap/Demo/Lib/ldapurl/
-share/examples/py-ldap/Demo/Lib/ldapurl/urlsearch.py
-share/examples/py-ldap/Demo/Lib/ldif/
-share/examples/py-ldap/Demo/Lib/ldif/ldifcopy.py
-share/examples/py-ldap/Demo/initialize.py
-share/examples/py-ldap/Demo/ldapcontrols.py
-share/examples/py-ldap/Demo/options.py
-share/examples/py-ldap/Demo/passwd_ext_op.py
-share/examples/py-ldap/Demo/pickle_ldapobject.py
-share/examples/py-ldap/Demo/reconnect.py
-share/examples/py-ldap/Demo/rename.py
-share/examples/py-ldap/Demo/sasl_bind.py
-share/examples/py-ldap/Demo/schema.py
-share/examples/py-ldap/Demo/schema_tree.py
-share/examples/py-ldap/Demo/simple.py
-share/examples/py-ldap/Demo/simplebrowse.py
Index: databases/py-ldap/pkg/PLIST-examples
===================================================================
RCS file: databases/py-ldap/pkg/PLIST-examples
diff -N databases/py-ldap/pkg/PLIST-examples
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ databases/py-ldap/pkg/PLIST-examples        2 Nov 2007 15:26:53 -0000
@@ -0,0 +1,22 @@
[EMAIL PROTECTED] $OpenBSD: PLIST,v 1.8 2006/11/16 10:09:56 mbalmer Exp $
+share/examples/py-ldap/
+share/examples/py-ldap/Demo/
+share/examples/py-ldap/Demo/Lib/
+share/examples/py-ldap/Demo/Lib/ldap/
+share/examples/py-ldap/Demo/Lib/ldap/res/
+share/examples/py-ldap/Demo/Lib/ldapurl/
+share/examples/py-ldap/Demo/Lib/ldapurl/urlsearch.py
+share/examples/py-ldap/Demo/Lib/ldif/
+share/examples/py-ldap/Demo/Lib/ldif/ldifcopy.py
+share/examples/py-ldap/Demo/initialize.py
+share/examples/py-ldap/Demo/ldapcontrols.py
+share/examples/py-ldap/Demo/options.py
+share/examples/py-ldap/Demo/passwd_ext_op.py
+share/examples/py-ldap/Demo/pickle_ldapobject.py
+share/examples/py-ldap/Demo/reconnect.py
+share/examples/py-ldap/Demo/rename.py
+share/examples/py-ldap/Demo/sasl_bind.py
+share/examples/py-ldap/Demo/schema.py
+share/examples/py-ldap/Demo/schema_tree.py
+share/examples/py-ldap/Demo/simple.py
+share/examples/py-ldap/Demo/simplebrowse.py
Index: databases/py-ldap/pkg/PLIST-main
===================================================================
RCS file: databases/py-ldap/pkg/PLIST-main
diff -N databases/py-ldap/pkg/PLIST-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ databases/py-ldap/pkg/PLIST-main    2 Nov 2007 15:26:53 -0000
@@ -0,0 +1,55 @@
[EMAIL PROTECTED] $OpenBSD: PLIST,v 1.8 2006/11/16 10:09:56 mbalmer Exp $
+lib/python${MODPY_VERSION}/site-packages/_ldap.so
+lib/python${MODPY_VERSION}/site-packages/dsml.py
+lib/python${MODPY_VERSION}/site-packages/dsml.pyc
+lib/python${MODPY_VERSION}/site-packages/dsml.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/
+lib/python${MODPY_VERSION}/site-packages/ldap/__init__.py
+lib/python${MODPY_VERSION}/site-packages/ldap/__init__.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/__init__.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/async.py
+lib/python${MODPY_VERSION}/site-packages/ldap/async.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/async.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/cidict.py
+lib/python${MODPY_VERSION}/site-packages/ldap/cidict.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/cidict.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/controls.py
+lib/python${MODPY_VERSION}/site-packages/ldap/controls.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/controls.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/dn.py
+lib/python${MODPY_VERSION}/site-packages/ldap/dn.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/dn.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/filter.py
+lib/python${MODPY_VERSION}/site-packages/ldap/filter.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/filter.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/functions.py
+lib/python${MODPY_VERSION}/site-packages/ldap/functions.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/functions.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/ldapobject.py
+lib/python${MODPY_VERSION}/site-packages/ldap/ldapobject.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/ldapobject.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/modlist.py
+lib/python${MODPY_VERSION}/site-packages/ldap/modlist.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/modlist.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/sasl.py
+lib/python${MODPY_VERSION}/site-packages/ldap/sasl.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/sasl.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/__init__.py
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/__init__.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/__init__.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/models.py
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/models.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/models.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/subentry.py
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/subentry.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/subentry.pyo
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/tokenizer.py
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/tokenizer.pyc
+lib/python${MODPY_VERSION}/site-packages/ldap/schema/tokenizer.pyo
+lib/python${MODPY_VERSION}/site-packages/ldapurl.py
+lib/python${MODPY_VERSION}/site-packages/ldapurl.pyc
+lib/python${MODPY_VERSION}/site-packages/ldapurl.pyo
+lib/python${MODPY_VERSION}/site-packages/ldif.py
+lib/python${MODPY_VERSION}/site-packages/ldif.pyc
+lib/python${MODPY_VERSION}/site-packages/ldif.pyo
Index: www/zope-ldapuserfolder/Makefile
===================================================================
RCS file: /cvs/ports/www/zope-ldapuserfolder/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- www/zope-ldapuserfolder/Makefile    15 Sep 2007 20:38:27 -0000      1.4
+++ www/zope-ldapuserfolder/Makefile    2 Nov 2007 15:26:53 -0000
@@ -21,7 +21,7 @@
MODULES= zope -RUN_DEPENDS= :py-ldap-*:databases/py-ldap
+RUN_DEPENDS=   :py24-ldap-*:databases/py-ldap,python2.4
WRKDIST= ${WRKDIR}/LDAPUserFolder

Reply via email to