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

Issue on install #101

Closed
esheldon opened this issue May 21, 2024 · 6 comments
Closed

Issue on install #101

esheldon opened this issue May 21, 2024 · 6 comments

Comments

@esheldon
Copy link
Contributor

python 3.11.6

git checkout v1.6.0rc2
pip install -e .
Obtaining file:///home/esheldon/tmp/skyCatalogs
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [134 lines of output]
      configuration error: `tool.setuptools.dynamic.version` must be valid exactly by one definition (0 matches found):
      
          - type: table
            additional keys: False
            keys:
              'attr': {type: string, format: 'python-qualified-identifier'}
            required: ['attr']
          - type: table
            additional keys: False
            keys:
              'file':
                exactly one of the following:
                  - {type: string}
                  - type: array
                    items: {type: string}
            required: ['file']
      
      DESCRIPTION:
          A version dynamically loaded via either the ``attr:`` or ``file:``
          directives. Please make sure the given file or attribute respects
          :pep:`440`. Also ensure to set ``project.dynamic`` accordingly.
      
      GIVEN VALUE:
          {
              "attr": ".skycatalogs._version.__version__"
          }
      
      OFFENDING RULE: 'oneOf'
      
      DEFINITION:
          {
              "oneOf": [
                  {
                      "title": "'attr:' directive",
                      "$id": "#/definitions/attr-directive",
                      "$$description": [
                          "Value is read from a module attribute. Supports callables and iterables;",
                          "unsupported types are cast via ``str()``"
                      ],
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                          "attr": {
                              "type": "string",
                              "format": "python-qualified-identifier"
                          }
                      },
                      "required": [
                          "attr"
                      ]
                  },
                  {
                      "$id": "#/definitions/file-directive",
                      "title": "'file:' directive",
                      "description": "Value is read from a file (or list of files and then concatenated)",
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                          "file": {
                              "oneOf": [
                                  {
                                      "type": "string"
                                  },
                                  {
                                      "type": "array",
                                      "items": {
                                          "type": "string"
                                      }
                                  }
                              ]
                          }
                      },
                      "required": [
                          "file"
                      ]
                  }
              ]
          }
      
      For more details about `format` see
      https://validate-pyproject.readthedocs.io/en/latest/api/validate_pyproject.formats.html
      
      Traceback (most recent call last):
        File "/home/esheldon/miniforge3/envs/test/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/esheldon/miniforge3/envs/test/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/esheldon/miniforge3/envs/test/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/home/esheldon/data/tmp/pip-build-env-9t5bbhqu/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 448, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/esheldon/data/tmp/pip-build-env-9t5bbhqu/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/esheldon/data/tmp/pip-build-env-9t5bbhqu/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/home/esheldon/data/tmp/pip-build-env-9t5bbhqu/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 1, in <module>
        File "/home/esheldon/data/tmp/pip-build-env-9t5bbhqu/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/esheldon/data/tmp/pip-build-env-9t5bbhqu/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 158, in setup
          dist.parse_config_files()
        File "/home/esheldon/data/tmp/pip-build-env-9t5bbhqu/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 632, in parse_config_files
          pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
        File "/home/esheldon/data/tmp/pip-build-env-9t5bbhqu/overlay/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 68, in apply_configuration
          config = read_configuration(filepath, True, ignore_option_errors, dist)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/esheldon/data/tmp/pip-build-env-9t5bbhqu/overlay/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 133, in read_configuration
          validate(subset, filepath)
        File "/home/esheldon/data/tmp/pip-build-env-9t5bbhqu/overlay/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 57, in validate
          raise ValueError(f"{error}\n{summary}") from None
      ValueError: invalid pyproject.toml config: `tool.setuptools.dynamic.version`.
      configuration error: `tool.setuptools.dynamic.version` must be valid exactly by one definition (0 matches found):
      
          - type: table
            additional keys: False
            keys:
              'attr': {type: string, format: 'python-qualified-identifier'}
            required: ['attr']
          - type: table
            additional keys: False
            keys:
              'file':
                exactly one of the following:
                  - {type: string}
                  - type: array
                    items: {type: string}
            required: ['file']
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
@esheldon
Copy link
Contributor Author

I see the same with python 3.10.14

This worked yesterday on both python versions.

@esheldon
Copy link
Contributor Author

considering that nothing changed in this branch since yesterday, I wonder where this is coming from.

I first notice this when I ran my CI today, for a different project, and this install failed even though I had not changed my CI at all.

then I tried it on my local computer and it also failed, whereas it had worked before.

Is this code trying to access something across the network that may have changed? (it also fails with --no-deps so that's not the issue)

@esheldon
Copy link
Contributor Author

On the suggestion of @beckermr adding --no-build-isolation worked

pip install --no-build-isolation --no-deps -e .

We should probably update the imsim docs about this

@beckermr
Copy link

We probably should put skyCatalogs into conda-forge.

@esheldon
Copy link
Contributor Author

More issues today: LSSTDESC/imSim#476

@JoanneBogart
Copy link
Collaborator

Fixed with #102

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

3 participants