Solved py38-certbot

Running FreeBSD 12.2 and after updating Python 3.7 to 3.8 and making sure all ports that rely on it are upgraded I cannot install py38-certbot ...

Code:
===>  Building for py38-certbot-1.14.0,1
running build
running build_py
running egg_info
writing certbot.egg-info/PKG-INFO
writing dependency_links to certbot.egg-info/dependency_links.txt
writing entry points to certbot.egg-info/entry_points.txt
writing requirements to certbot.egg-info/requires.txt
writing top-level names to certbot.egg-info/top_level.txt
reading manifest file 'certbot.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.py[cod]' found anywhere in distribution
writing manifest file 'certbot.egg-info/SOURCES.txt'
(cd /usr/ports/security/py-certbot/work-py38/certbot-1.14.0/docs &&  sphinx-build-3.8 -N -b man . _build/man)
Traceback (most recent call last):
  File "/usr/local/bin/sphinx-build-3.8", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    def _initialize_master_working_set():
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'packaging' distribution was not found and is required by Sphinx
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/security/py-certbot
*** Error code 1

Stop.
make: stopped in /usr/ports/security/py-certbot

Way out of my depth here but it looks like its got an issue with sphinx-build.
 
and after updating Python 3.7 to 3.8
Did you follow /usr/ports/UPDATING?
Code:
20210425:
  AFFECTS: users of python
  AUTHOR: kai@FreeBSD.org

  The default version of python3 and python was switched to 3.8.

  For ports users wanting to keep version 3.7 as default,
  add DEFAULT_VERSIONS+= python=3.7 python3=3.7 to make.conf

  Following procedures may ease the upgrade:

  For users of pre-build packages:
  # sh
  # for i in $(pkg query -g %n 'py37-*'); do pkg set -yn ${i}:py38-${i#py37-}; done
  # pkg upgrade

  For portmaster users:
  # sh
  # portmaster -o lang/python38 python37
  # REINSTALL="$(pkg info -o py37-\* | awk '{printf "%s ", $2}')"
  # pkg delete -f py37-\*
  # portmaster $REINSTALL
  # REBUILD=$(pkg query -g "%n:%dn" '*' | grep py3 | grep -v py38 | cut -d : -f 1 | sort -u)
  # portmaster $REBUILD
  # REBUILD2=$(pkg list | grep python-37 | xargs pkg which | awk '{print $6}' | sort -u)
  # portmaster $REBUILD2
 
Yes I did. The issue only came to light when the CRON I have running informed me that certbot wasn't found.
 
It does build properly:
Code:
root@maelcum:~ # pkg version -vRx certbot
Updating dicelan repository catalogue...
dicelan repository is up to date.
All repositories are up to date.
py38-certbot-1.14.0,1              =   up-to-date with remote
That one comes from my own repository. As these are always built in a "clean" environment I suspect there's an old module interfering on your system. Or a dependency hasn't been updated correctly. After the upgrade did you also run pkg-autoremove(8) to remove all unnecessary dependencies?
 
In pkg, py38-packaging doesn't seem to exist and Sphinx doesn't seem to be updated for it either. Seems like you'll have to rebuild those things from ports too.
 
This is getting weirder by the minute. I reinstalled py38-packaging and py38-sphinx and now the attempted installation of py38-certbot now shows a different failure ...

Code:
===>  Building for py38-certbot-1.14.0,1
running build
running build_py
running egg_info
writing certbot.egg-info/PKG-INFO
writing dependency_links to certbot.egg-info/dependency_links.txt
writing entry points to certbot.egg-info/entry_points.txt
writing requirements to certbot.egg-info/requires.txt
writing top-level names to certbot.egg-info/top_level.txt
reading manifest file 'certbot.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.py[cod]' found anywhere in distribution
writing manifest file 'certbot.egg-info/SOURCES.txt'
(cd /usr/ports/security/py-certbot/work-py38/certbot-1.14.0/docs &&  sphinx-build-3.8 -N -b man . _build/man)
Traceback (most recent call last):
  File "/usr/local/bin/sphinx-build-3.8", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    def _initialize_master_working_set():
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests>=2.5.0' distribution was not found and is required by Sphinx
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/security/py-certbot
*** Error code 1

Stop.
make: stopped in /usr/ports/security/py-certbot

which shows requests>=2.5.0 when the latest version appears to be 2.22.0_2 ...


SirDice in answer to your question, yes I have run pkg autoremove
 
Okay I think something has gone wrong with the upgrade. I reinstalled py38-requests and the error changed to py38-imagesize. So using pkg show py38-Babel I got this. Note the flavor is incorrectly showing py37...

Code:
py38-Babel-2.9.0
Name           : py38-Babel
Version        : 2.9.0
Installed on   : Fri Feb 12 09:22:01 2021 GMT
Origin         : devel/py-babel
Architecture   : FreeBSD:12:*
Prefix         : /usr/local
Categories     : python devel
Licenses       : BSD3CLAUSE
Maintainer     : bofh@FreeBSD.org
WWW            : http://babel.pocoo.org/
Comment        : Collection of tools for internationalizing Python applications
Options        :
DOCS           : on
Annotations    :
flavor         : py37
Flat size      : 27.3MiB
Description    :
Babel is composed of two major parts:

    * tools to build and work with gettext message catalogs

    * a Python interface to the CLDR (Common Locale Data Repository),
      providing access to various locale display names, localized
      number and date formatting, etc.

WWW: http://babel.pocoo.org/

Locked         : no

and there are a few others as well.
 
Back
Top