dipc-cc / hubbard

Python tools for mean-field Hubbard models
https://dipc-cc.github.io/hubbard/
GNU Lesser General Public License v3.0
21 stars 8 forks source link

Issues with toml/cfg files for installation #127

Closed AleksBL closed 1 year ago

AleksBL commented 1 year ago

Hi, I had some problems getting the hubbard code onto the hpc cluster, removing the .toml and .cfg files solved the issue. Somebody should have a look at if something is incompatible with te newer pip versions?

\Aleksander

zerothi commented 1 year ago

On hpc which python versions are you using? Mine? Or?

zerothi commented 1 year ago

And what is the error?

zerothi commented 1 year ago

@AleksBL could you post the error log here? :)

AleksBL commented 1 year ago

Just to mention it, this is another branch hubbard code i think, I dont know if all updates to the main branch carries over here

the error:

hpclogin1(abalo) $ pip install -e . Defaulting to user installation because normal site-packages is not writeable Obtaining file:///zhome/f4/3/160519/hubbard_devel/Hubbard/hubbard Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... done Preparing editable metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing editable metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [61 lines of output] configuration error: project.urls must be object DESCRIPTION: URLs associated with the project in the form label => value.

  GIVEN VALUE:
      [
          {
              "homepage": "https://dipc-cc.github.io/hubbard/"
          },
          {
              "releases": "https://github.com/dipc-cc/hubbard/releases"
          },
          {
              "documentation": "https://dipc-cc.github.io/hubbard/"
          },
          {
              "repository": "https://github.com/dipc-cc/hubbard"
          }
      ]

  OFFENDING RULE: 'type'

  DEFINITION:
      {
          "type": "object",
          "additionalProperties": false,
          "patternProperties": {
              "^.+$": {
                  "type": "string",
                  "format": "url"
              }
          }
      }
  Traceback (most recent call last):
    File "/dtu/sw/dcc/SL73/2021-nov/XeonGold6126/gnu/11.2.0/python/3.9.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/dtu/sw/dcc/SL73/2021-nov/XeonGold6126/gnu/11.2.0/python/3.9.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/dtu/sw/dcc/SL73/2021-nov/XeonGold6126/gnu/11.2.0/python/3.9.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 191, in prepare_metadata_for_build_editable
      return hook(metadata_directory, config_settings)
    File "/tmp/pip-build-env-7zuwbb2q/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 450, in prepare_metadata_for_build_editable
      return self.prepare_metadata_for_build_wheel(
    File "/tmp/pip-build-env-7zuwbb2q/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 377, in prepare_metadata_for_build_wheel
      self.run_setup()
    File "/tmp/pip-build-env-7zuwbb2q/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
      exec(code, locals())
    File "<string>", line 35, in <module>
    File "/tmp/pip-build-env-7zuwbb2q/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "/tmp/pip-build-env-7zuwbb2q/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 159, in setup
      dist.parse_config_files()
    File "/tmp/pip-build-env-7zuwbb2q/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 868, in parse_config_files
      pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
    File "/tmp/pip-build-env-7zuwbb2q/overlay/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py", line 62, in apply_configuration
      config = read_configuration(filepath, True, ignore_option_errors, dist)
    File "/tmp/pip-build-env-7zuwbb2q/overlay/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py", line 126, in read_configuration
      validate(subset, filepath)
    File "/tmp/pip-build-env-7zuwbb2q/overlay/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py", line 51, in validate
      raise ValueError(f"{error}\n{summary}") from None
  ValueError: invalid pyproject.toml config: `project.urls`.
  configuration error: `project.urls` must be object
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

[notice] A new release of pip available: 22.2.2 -> 22.3 [notice] To update, run: pip install --upgrade pip

zerothi commented 1 year ago

Could you try #128 ?