#68652 closed defect (fixed)

py-pyfiglet: Missing setuptools dependency

Reported by: gpolitis (George Politis) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-pyfiglet

Description

I had to install py310-pip to run this program.

Change History (9)

comment:1 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to harens
Priority: LowNormal
Status: newassigned
Summary: Missing dependencytermdown: Missing py310-pip dependency

comment:2 Changed 11 months ago by jmroot (Joshua Root)

I'm not sure how that could be the case, given that the only occurrence of the string "pip" in the termdown sources is in the Readme. What did you do and what was the result?

comment:3 Changed 11 months ago by gpolitis (George Politis)

When I first run the program I got a Python exception about a missing module that looked like this :

laptop$ termdown
Traceback (most recent call last):
...
ModuleNotFoundError: No module named 'pkg_resources'

I'm sorry haven't kept the full stack trace and I can't reproduce the issue anymore. I googled this error and the first result suggested to install pip, so I did and it fixed the problem for me.

I'm on macOS 12.7.1

comment:4 Changed 11 months ago by jmroot (Joshua Root)

pkg_resources is provided by setuptools, so that could indeed be a missing runtime dependency of something in the dependencies, but it doesn't seem to be used by termdown itself. Installing pip coincidentally installs setuptools as a dependency.

comment:5 Changed 11 months ago by jmroot (Joshua Root)

If you deactivate setuptools, you can probably reproduce the error so you can post it here.

comment:6 Changed 11 months ago by gpolitis (George Politis)

You are correct! :

gpolitis@laptop ~ % sudo port deactivate py310-setuptools
Password:
Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents.
The following ports will break: py310-pip @23.2.1_0
Continue? [y/N]: y
Warning: Deactivate forced.  Proceeding despite dependencies.
--->  Deactivating py310-setuptools @68.2.2_0
--->  Cleaning py310-setuptools
gpolitis@laptop ~ % termdown -s 1m                       
Traceback (most recent call last):
  File "/opt/local/bin/termdown", line 33, in <module>
    sys.exit(load_entry_point('termdown==1.18.0', 'console_scripts', 'termdown')())
  File "/opt/local/bin/termdown", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/termdown.py", line 21, in <module>
    from pyfiglet import CharNotPrinted, Figlet
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyfiglet/__init__.py", line 11, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

comment:7 Changed 11 months ago by jmroot (Joshua Root)

OK, so the use of pkg_resources is actually in pyfiglet.

comment:8 Changed 11 months ago by jmroot (Joshua Root)

Owner: harens deleted
Port: py-pyfiglet added; termdown removed
Summary: termdown: Missing py310-pip dependencypy-pyfiglet: Missing setuptools dependency

comment:9 Changed 11 months ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: assignedclosed

In c2eccee241419aa62c777add264383fd0e446679/macports-ports (master):

py-pyfiglet: update to 1.0.2, update python versions

No longer supports python 3.8.

Closes: #68652

Note: See TracTickets for help on using tickets.