On 2021/10/31 21:36, Landry Breuil wrote:
> Hi,
> 
> long story short, i wanted to update buildbot to 3.4.0, which moved from
> sqlalchemy-migrate to alembic
> (https://github.com/buildbot/buildbot/issues/5872) so i started porting
> alembici (https://alembic.sqlalchemy.org), to find out our py-sqlalchemy
> was a bit dated (2+ years?).
> 
> went on upgrading it to 1.4.26 (2.x claims only py3 support, but its not
> released yet), but after testing a bit it seems 1.4.26 doesnt really
> support py2 (default FLAVOR blows during fake for some py3-only async
> keywords ?) so i looked at what depends on sqlalchemy:
> 
> databases/py-flask-sqlalchemy,python3
> databases/py-sqlalchemy-migrate,python3 (only used by buildbot, not much 
> maintained, upstream advises to use alembic)
> devel/py-buildbot/buildbot (py3 only)
> devel/py-texscythe (used to generate PLISTs for texlive 2017 ??)
> games/childsplay (was removed)
> productivity/yokadi (py3 only)
> 
> so, the 'easy' way is to just:
> - make sqlalchemy py3 only - almost all tests (but 5) of this new version 
> passes
> - that allows to fold back -main and -docs (more or less reverting
> https://github.com/openbsd/ports/commit/156a9cbc117d47aa7353d91f392fa57cf308d798)
> - i think i got the pkgpath/conflict thing right, as running make update
>   succeeds:
> py-sqlalchemy-1.2.19p2+py-sqlalchemy-docs-1.2.19p1+py3-sqlalchemy-1.2.19p2->py3-sqlalchemy-1.4.26:
>  ok
> - drop py-texscythe (edd ? is this script still useful? needs porting to py3)
> - drop py-sqlalchemy-migrate ?
> - bump REVISION for all remaining ports depending on sqlalchemy (eg
>   py-flask-sqlalchemy, buildbot, yokadi)
> - import alembic (tests: 1374 passed, 411 skipped in 86.65 seconds)
> 
> feedback ? comments ?

agreed with this approach

> Landry

> ? tests.txt
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/databases/py-sqlalchemy/Makefile,v
> retrieving revision 1.46
> diff -u -r1.46 Makefile
> --- Makefile  21 May 2021 19:50:22 -0000      1.46
> +++ Makefile  31 Oct 2021 20:12:28 -0000
> @@ -1,16 +1,10 @@
>  # $OpenBSD: Makefile,v 1.46 2021/05/21 19:50:22 kmos Exp $
>  
> -COMMENT-main =               database toolkit for Python
> -COMMENT-docs =               documentation and examples for sqlalchemy
> +COMMENT =            database toolkit for Python
>  
> -MODPY_EGG_VERSION =  1.2.19
> +MODPY_EGG_VERSION =  1.4.26
>  DISTNAME =           SQLAlchemy-${MODPY_EGG_VERSION}
> -FULLPKGNAME-main =   ${MODPY_PY_PREFIX}sqlalchemy-${MODPY_EGG_VERSION}
> -FULLPKGPATH-main =   databases/py-sqlalchemy${MODPY_FLAVOR},-main
> -FULLPKGNAME-docs =   py-sqlalchemy-docs-${MODPY_EGG_VERSION}
> -FULLPKGPATH-docs =   databases/py-sqlalchemy,-docs
> -REVISION-main =              2
> -REVISION-docs =              1
> +FULLPKGNAME =        ${MODPY_PY_PREFIX}sqlalchemy-${MODPY_EGG_VERSION}

just use PKGNAME now we don't have multipkgs to worry about.
this should do the trick:

PKGNAME = py-sqlalchemy-${MODPY_EGG_VERSION}

>  
>  CATEGORIES =         databases
>  
> @@ -27,12 +21,8 @@
>  
>  SUBST_VARS+=         MODPY_FLAVOR
>  
> -RUN_DEPENDS +=               databases/py-sqlalchemy,-docs
> -RUN_DEPENDS-docs =   #empty
> -
> -MULTI_PACKAGES =     -main -docs
>  FLAVORS =            python3
> -FLAVOR ?=
> +FLAVOR ?=            python3

s/FLAVOR ?=/FLAVOR =/

>  
>  MAKE_ENV +=          PYTHONPATH=.
>  MODPY_PYTEST =               Yes
> @@ -40,10 +30,6 @@
>  # Other DB connectors would work, too.
>  TEST_DEPENDS =               devel/py-test-xdist${MODPY_FLAVOR} \
>                       devel/py-mock${MODPY_FLAVOR}
> -# On python3, sqlite3 is used.
> -.if !${FLAVOR:Mpython3}
> -TEST_DEPENDS +=              databases/py-sqlite2${MODPY_FLAVOR}>=2.8.3
> -.endif
>  
>  post-install:
>       ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/py-sqlalchemy
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/databases/py-sqlalchemy/distinfo,v
> retrieving revision 1.22
> diff -u -r1.22 distinfo
> --- distinfo  30 Dec 2019 13:02:26 -0000      1.22
> +++ distinfo  31 Oct 2021 20:12:28 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (SQLAlchemy-1.2.19.tar.gz) = 
> W7LE/CvMNEetRXFsZlgeq5gsAH3PklSCSY2HM/hvF8c=
> -SIZE (SQLAlchemy-1.2.19.tar.gz) = 5662992
> +SHA256 (SQLAlchemy-1.4.26.tar.gz) = 
> a8f519kO9V6MbbEwioYZzY9A4ko091kRm5XnKE3KNRo=
> +SIZE (SQLAlchemy-1.4.26.tar.gz) = 7836259
> Index: patches/patch-setup_cfg
> ===================================================================
> RCS file: patches/patch-setup_cfg
> diff -N patches/patch-setup_cfg
> --- patches/patch-setup_cfg   9 Nov 2018 19:46:04 -0000       1.4
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,15 +0,0 @@
> -Disable configuration option not supported by nose.
> -
> -$OpenBSD: patch-setup_cfg,v 1.4 2018/11/09 19:46:04 danj Exp $
> -Index: setup.cfg
> ---- setup.cfg.orig
> -+++ setup.cfg
> -@@ -8,7 +8,7 @@ license_file = LICENSE
> - [nosetests]
> - with-sqla_testing = true
> - exclude = ^examples
> --first-package-wins = true
> -+#first-package-wins = true
> - where = test
> - 
> - [tool:pytest]
> Index: pkg/DESCR
> ===================================================================
> RCS file: pkg/DESCR
> diff -N pkg/DESCR
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ pkg/DESCR 31 Oct 2021 20:12:28 -0000
> @@ -0,0 +1,6 @@
> +SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
> +gives application developers the full power and flexibility of SQL.
> +
> +It provides a full suite of well known enterprise-level persistence
> +patterns, designed for efficient and high-performing database access,
> +adapted into a simple and Pythonic domain language.
> Index: pkg/DESCR-docs
> ===================================================================
> RCS file: pkg/DESCR-docs
> diff -N pkg/DESCR-docs
> --- pkg/DESCR-docs    23 Jun 2018 21:39:45 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1 +0,0 @@
> -SQLAlchemy documentation and examples.
> Index: pkg/DESCR-main
> ===================================================================
> RCS file: pkg/DESCR-main
> diff -N pkg/DESCR-main
> --- pkg/DESCR-main    23 Jun 2018 21:39:45 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,6 +0,0 @@
> -SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
> -gives application developers the full power and flexibility of SQL.
> -
> -It provides a full suite of well known enterprise-level persistence
> -patterns, designed for efficient and high-performing database access,
> -adapted into a simple and Pythonic domain language.
> Index: pkg/PLIST
> ===================================================================
> RCS file: pkg/PLIST
> diff -N pkg/PLIST
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ pkg/PLIST 31 Oct 2021 20:12:28 -0000
> @@ -0,0 +1,1117 @@
> +@comment $OpenBSD: PLIST,v$
> +@conflict py-sqlalchemy-<1.4
> +@conflict py-sqlalchemy-docs-<1.4
> +@conflict py3-sqlalchemy-<1.4
> +@pkgpath databases/py-sqlalchemy,-main${MODPY_FLAVOR}
> +@pkgpath databases/py-sqlalchemy,-docs${MODPY_FLAVOR}

@conflict LGTM. @pkgpath should be this, because it has to replace both
py3 and unflavoured versions:

@pkgpath databases/py-sqlalchemy,-main
@pkgpath databases/py-sqlalchemy,-docs
@pkgpath databases/py-sqlalchemy,-main,python3
@pkgpath databases/py-sqlalchemy,-docs,python3

it also needs quirks py-sqlalchemy -> py3-sqlalchemy.

i _think_ it does not need a quirk for docs (the @conflict should take
care of that) but better to check.

> +lib/python${MODPY_VERSION}/site-packages/SQLAlchemy-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/
<snip>

Reply via email to