Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make runtime dependency on pkg_resources explicit #115

Open
peter-malcolm-bw opened this issue Feb 10, 2025 · 1 comment
Open

Make runtime dependency on pkg_resources explicit #115

peter-malcolm-bw opened this issue Feb 10, 2025 · 1 comment

Comments

@peter-malcolm-bw
Copy link

peter-malcolm-bw commented Feb 10, 2025

We're trying to use the tap in a uv managed virtual environment and the tap is failing to run due to an import error.

I can reproduce the error with the following command:

uvx tap-bing-ads

Produces the following error:

Traceback (most recent call last):
  File "~/Library/Caches/uv/archive-v0/-8L4x22tSjG22uG3pghnO/bin/tap-bing-ads", line 7, in <module>
    from tap_bing_ads import main
  File "~/Library/Caches/uv/archive-v0/-8L4x22tSjG22uG3pghnO/lib/python3.11/site-packages/tap_bing_ads/__init__.py", line 18, in <module>
    import bingads
  File "~/Library/Caches/uv/archive-v0/-8L4x22tSjG22uG3pghnO/lib/python3.11/site-packages/bingads/__init__.py", line 3, in <module>
    from .service_client import *
  File "~/Library/Caches/uv/archive-v0/-8L4x22tSjG22uG3pghnO/lib/python3.11/site-packages/bingads/service_client.py", line 5, in <module>
    from .service_info import SERVICE_INFO_DICT
  File "~/Library/Caches/uv/archive-v0/-8L4x22tSjG22uG3pghnO/lib/python3.11/site-packages/bingads/service_info.py", line 1, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

This issue is covered in more detail here: https://www.cosmoscalibur.com/en/blog/2025/modulo-pkg-resources-no-encontrado-en-ambientes-uv/

I believe it could be resolved by editing setup.py to make pkg_resources an explicit runtime dependency.

@peter-malcolm-bw peter-malcolm-bw changed the title Make dependency on pkg_resources package explicit Make runtime dependency on pkg_resources package explicit Feb 10, 2025
@peter-malcolm-bw peter-malcolm-bw changed the title Make runtime dependency on pkg_resources package explicit Make runtime dependency on pkg_resources explicit Feb 10, 2025
@peter-malcolm-bw
Copy link
Author

peter-malcolm-bw commented Feb 10, 2025

I think this also becomes a breaking change for upgrading to python3.12 where setuptools has become optional see python/cpython#101039:

Steps to reproduce:

python3.12 -m venv venv
source venv/bin/activate
pip install tap-bing-ads
tap-bing-ads --help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant