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

[pymongocrypt] Cannot build sdist with Setuptools 70.0

    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Detailed steps to reproduce the problem?

      Attempt to install pymongocrypt from source.

      configuration error: `tool.setuptools.dynamic.version` must be valid exactly by one definition (0 matches found).

      Setuptools version 70.0 introduced new validation, that fails with our tool.setuptools.dynamic.version. We have to change it to pymongocrypt.version._version instead of pymongocrypt/version.version_.

      https://spruce.mongodb.com/task/mongo_python_driver_tests_python_version_rhel8_test_encryption__platform~rhel8_auth_ssl~noauth_nossl_python_version~3.10_encryption~encryption_crypt_shared_test_5.0_replica_set_patch_594dacaaf969904ba938bd29b28e40579d418673_664ca81aaf0a1e00077c77d0_24_05_21_13_56_46/logs?execution=0&sortBy=STATUS&sortDir=ASC

      2024/05/21 09:17:15.197]   error: subprocess-exited-with-error
       [2024/05/21 09:17:15.197]   × Getting requirements to build wheel did not run successfully.
       [2024/05/21 09:17:15.197]   │ exit code: 1
       [2024/05/21 09:17:15.197]   ╰─> [128 lines of output]
       [2024/05/21 09:17:15.197]       configuration error: `tool.setuptools.dynamic.version` must be valid exactly by one definition (0 matches found):
       [2024/05/21 09:17:15.197]           - type: table
       [2024/05/21 09:17:15.197]             additional keys: False
       [2024/05/21 09:17:15.197]             keys:
       [2024/05/21 09:17:15.197]               'attr': {type: string, format: 'python-qualified-identifier'}
       [2024/05/21 09:17:15.197]             required: ['attr']
       [2024/05/21 09:17:15.197]           - type: table
       [2024/05/21 09:17:15.197]             additional keys: False
       [2024/05/21 09:17:15.197]             keys:
       [2024/05/21 09:17:15.197]               'file':
       [2024/05/21 09:17:15.197]                 exactly one of the following:
       [2024/05/21 09:17:15.197]                   - {type: string}
       [2024/05/21 09:17:15.197]                   - type: array
       [2024/05/21 09:17:15.197]                     items: {type: string}
       [2024/05/21 09:17:15.197]             required: ['file']
       [2024/05/21 09:17:15.197]       DESCRIPTION:
       [2024/05/21 09:17:15.197]           A version dynamically loaded via either the ``attr:`` or ``file:``
       [2024/05/21 09:17:15.197]           directives. Please make sure the given file or attribute respects
       [2024/05/21 09:17:15.197]           :pep:`440`. Also ensure to set ``project.dynamic`` accordingly.
       [2024/05/21 09:17:15.197]       GIVEN VALUE:
       [2024/05/21 09:17:15.197]           {
       [2024/05/21 09:17:15.197]               "attr": "pymongocrypt/version.__version__"
       [2024/05/21 09:17:15.197]           }
       [2024/05/21 09:17:15.197]       OFFENDING RULE: 'oneOf'
       [2024/05/21 09:17:15.197]       DEFINITION:
       [2024/05/21 09:17:15.197]           {
       [2024/05/21 09:17:15.197]               "oneOf": [
       [2024/05/21 09:17:15.197]                   {
       [2024/05/21 09:17:15.197]                       "title": "'attr:' directive",
       [2024/05/21 09:17:15.197]                       "$id": "#/definitions/attr-directive",
       [2024/05/21 09:17:15.197]                       "$$description": [
       [2024/05/21 09:17:15.197]                           "Value is read from a module attribute. Supports callables and iterables;",
       [2024/05/21 09:17:15.197]                           "unsupported types are cast via ``str()``"
       [2024/05/21 09:17:15.197]                       ],
       [2024/05/21 09:17:15.197]                       "type": "object",
       [2024/05/21 09:17:15.197]                       "additionalProperties": false,
       [2024/05/21 09:17:15.197]                       "properties": {
       [2024/05/21 09:17:15.197]                           "attr": {
       [2024/05/21 09:17:15.198]                               "type": "string",
       [2024/05/21 09:17:15.198]                               "format": "python-qualified-identifier"
       [2024/05/21 09:17:15.198]                           }
       [2024/05/21 09:17:15.198]                       },
       [2024/05/21 09:17:15.198]                       "required": [
       [2024/05/21 09:17:15.198]                           "attr"
       [2024/05/21 09:17:15.198]                       ]
       [2024/05/21 09:17:15.198]                   },
       [2024/05/21 09:17:15.198]                   {
       [2024/05/21 09:17:15.198]                       "$id": "#/definitions/file-directive",
       [2024/05/21 09:17:15.198]                       "title": "'file:' directive",
       [2024/05/21 09:17:15.198]                       "description": "Value is read from a file (or list of files and then concatenated)",
       [2024/05/21 09:17:15.198]                       "type": "object",
       [2024/05/21 09:17:15.198]                       "additionalProperties": false,
       [2024/05/21 09:17:15.198]                       "properties": {
       [2024/05/21 09:17:15.198]                           "file": {
       [2024/05/21 09:17:15.198]                               "oneOf": [
       [2024/05/21 09:17:15.198]                                   {
       [2024/05/21 09:17:15.198]                                       "type": "string"
       [2024/05/21 09:17:15.198]                                   },
       [2024/05/21 09:17:15.198]                                   {
       [2024/05/21 09:17:15.198]                                       "type": "array",
       [2024/05/21 09:17:15.198]                                       "items": {
       [2024/05/21 09:17:15.198]                                           "type": "string"
       [2024/05/21 09:17:15.198]                                       }
       [2024/05/21 09:17:15.198]                                   }
       [2024/05/21 09:17:15.198]                               ]
       [2024/05/21 09:17:15.198]                           }
       [2024/05/21 09:17:15.198]                       },
       [2024/05/21 09:17:15.198]                       "required": [
       [2024/05/21 09:17:15.198]                           "file"
       [2024/05/21 09:17:15.198]                       ]
       [2024/05/21 09:17:15.198]                   }
       [2024/05/21 09:17:15.198]               ]
       [2024/05/21 09:17:15.198]           }
       [2024/05/21 09:17:15.198]       For more details about `format` see
       [2024/05/21 09:17:15.198]       https://validate-pyproject.readthedocs.io/en/latest/api/validate_pyproject.formats.html
      

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: