Univention Bugzilla – Bug 49136
Migrate base/univention-lib to dh_python2
Last modified: 2019-11-05 17:12:43 CET
The package base/univention-lib should be migrated to use dh_python instead of python-support. Migration-Guide: https://hutten.knut.univention.de/mediawiki/index.php/Python_DebHelper_Migration
Depends on: services/univention-printserver/cups-printers.py:» » » subprocess.call(['python', '/usr/share/pyshared/univention/lib/share_restrictions.py'])
Pyshared references needs to be adjusted: base/univention-lib/shell/license.sh:» python /usr/share/pyshared/univention/lib/license_tools.py
Package has been migrated. Hardcoded uses of pyshared/pymodules has been replaced with python -m. Except for the utility functions in base.sh because they need to be done when migrating UCR. f735fd1cb547 | Bug #49136: adjust python script path univention-lib (8.0.0-6) d3b84ff14719 | Bug #49136: Merge branch 'dh-python/49136-univention-lib' into 4.4-0 e2aeaeb31cb7 | Bug #49136: pep8 4d2144c3e059 | Bug #49136: migrate calls to ucs_registerLDAPExtension / ucs_unregisterLDAPExtension 85e7232b43b2 | Bug #49136: migrate to dh_python 9d0ba8760cd9 | Bug #49136: migrate to dh_python d667a3d8e0db | Bug #49136: fix use of pyshared path univention-lib.yaml d3b84ff14719 | Bug #49136: Merge branch 'dh-python/49136-univention-lib' into 4.4-0 d11943977f38 | YAML Bug #49136
I created the package python3-univention-lib and made it importable/installable: apt-get download python3-univention-lib dpkg -i --ignore-depends=python3-{ldap,ldb,samba,univention-{debug,config-registry}} python3-univention-lib_*.deb univention-lib (8.0.0-7) 43956305b3dd | Bug #49136: fix exception reraising 8eeaeb7d6856 | Bug #49136: libfuturize.fixes.fix_print_with_import c96a6bee28e5 | Bug #49136: Add python3-univention-lib package
I adjusted the dependencies for the python3 package: Depend: python3-ldap | python3-pyldap. Thanks!
[4.4-0] 335a4acd2f Bug #49176 lib: Fix pysupport during update base/univention-lib/debian/changelog | 6 ++++++ base/univention-lib/debian/python-univention-lib.install | 1 + base/univention-lib/debian/python-univention-lib.postinst | 4 ++++ base/univention-lib/python-univention-lib.public | 1 + base/univention-lib/python/__init__.py | 5 ++--- 5 files changed, 14 insertions(+), 3 deletions(-) Package: univention-lib Version: 8.0.1-20A~4.4.0.201905281421 Branch: ucs_4.4-0 Scope: errata4.4-0 [4.4-0] d80cebf799 Bug #49136: univention-lib 8.0.1-20A~4.4.0.201905281421 doc/errata/staging/univention-lib.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) QA: __import__("univention.lib").lib.__path__ # ['/usr/lib/python2.7/dist-packages/univention/lib','/usr/lib/pymodules/python2.7/univention/lib'] __import__("univention.lib.account").lib.account.__file__ # '/usr/lib/pymodules/python2.7/univention/lib/account.pyc' __import__("univention.lib.ucs").lib.ucs.__file__ # '/usr/lib/python2.7/dist-packages/univention/lib/ucs.pyc' update-python-modules -f
What I tested: The test was always the same: ''' from univention.lib import password # installed through pysupport from univention.lib import error # installed through dh_python ''' and in a new process the other way around Update from errata0 -> OK Update from errata113 (includes updated univention-python) -> OK Installing latest test iso -> OK update-python-modules -f -> OK (__init__.py is not overwritten with an empty file and imports work) No jenkins test failures seem to be related to this -> OK YAML -> OK
<http://errata.software-univention.de/ucs/4.4/125.html> <http://errata.software-univention.de/ucs/4.4/129.html>