Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4070

tox -m test can fail to find setuptools

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.7
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Detailed steps to reproduce the problem?

      $ brew install tox

      $ python3 -m venv venv

      $ . venv/bin/activate
      $ python -m pip install "pymongo[gssapi,aws,ocsp,snappy,zstd,encryption,test]"
      $ tox -m test

      test: install_package> python -I -m pip install --force-reinstall --no-deps /Users/casey.clements/src/mongo-python-driver/.tox/.tmp/package/61/pymongo-4.7.0.dev0.tar.gz
      test: commands[0]> python --version
      Python 3.12.0
      test: commands[1]> .evergreen/check-c-extensions.sh
      Traceback (most recent call last):
        File "/Users/casey.clements/src/mongo-python-driver/setup.py", line 13, in <module>
          from setuptools import setup
      ModuleNotFoundError: No module named 'setuptools'

      Definition of done: what must be done to consider the task complete?

      If I add setuptools as a dep in the test target in tox.ini, the problem goes away. This already exists in the test-eg target. No harm in adding it, even everyone does not encounter this.

      The exact Python version used, with patch level:

      $ python -c "import sys; print(sys.version)"

      3.11.6 (v3.11.6:8b6ee5ba3b, Oct  2 2023, 11:18:21) [Clang 13.0.0 (clang-1300.0.29.30)]

      The exact version of PyMongo used, with patch level:

      $ python -c "import pymongo; print(pymongo.version); print(pymongo.has_c())"

      4.7.0.dev0

      Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc.

      Local

      The operating system and version (e.g. Windows 7, OSX 10.8, ...)

      OSX 12.3 M1

            Assignee:
            casey.clements@mongodb.com Casey Clements
            Reporter:
            casey.clements@mongodb.com Casey Clements
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: