developmentseed / titiler

Build your own Raster dynamic map tile services
https://developmentseed.org/titiler/
MIT License
765 stars 157 forks source link

Wheels not available for recent releases #751

Closed JackDunnNZ closed 8 months ago

JackDunnNZ commented 8 months ago

It looks like there was an error during the CI job on recent releases when building the wheel for the overall titiler package, the subpackages seemed to build fine:

https://github.com/developmentseed/titiler/actions/runs/7452624450/job/20276373833#step:7:401

This results in an error when I try to install the package with pip (v23.3.1):

$ python3 -m pip install titiler
Collecting titiler
  Downloading titiler-0.16.1.tar.gz (5.3 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [41 lines of output]
      Traceback (most recent call last):
        File "/private/tmp/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/private/tmp/venv/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 "/private/tmp/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/0b/ql7ss_5s1d5082x_3zcgszn80000gn/T/pip-build-env-2qt_2dyn/overlay/lib/python3.11/site-packages/hatchling/build.py", line 58, in build_wheel
          return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/0b/ql7ss_5s1d5082x_3zcgszn80000gn/T/pip-build-env-2qt_2dyn/overlay/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 155, in build
          artifact = version_api[version](directory, **build_data)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/0b/ql7ss_5s1d5082x_3zcgszn80000gn/T/pip-build-env-2qt_2dyn/overlay/lib/python3.11/site-packages/hatchling/builders/wheel.py", line 412, in build_standard
          for included_file in self.recurse_included_files():
        File "/private/var/folders/0b/ql7ss_5s1d5082x_3zcgszn80000gn/T/pip-build-env-2qt_2dyn/overlay/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 176, in recurse_included_files
          yield from self.recurse_selected_project_files()
        File "/private/var/folders/0b/ql7ss_5s1d5082x_3zcgszn80000gn/T/pip-build-env-2qt_2dyn/overlay/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 180, in recurse_selected_project_files
          if self.config.only_include:
             ^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/0b/ql7ss_5s1d5082x_3zcgszn80000gn/T/pip-build-env-2qt_2dyn/overlay/lib/python3.11/site-packages/hatchling/builders/config.py", line 781, in only_include
          only_include = only_include_config.get('only-include', self.default_only_include()) or self.packages
                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/0b/ql7ss_5s1d5082x_3zcgszn80000gn/T/pip-build-env-2qt_2dyn/overlay/lib/python3.11/site-packages/hatchling/builders/wheel.py", line 231, in default_only_include
          return self.default_file_selection_options.only_include
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/functools.py", line 1001, in __get__
          val = self.func(instance)
                ^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/0b/ql7ss_5s1d5082x_3zcgszn80000gn/T/pip-build-env-2qt_2dyn/overlay/lib/python3.11/site-packages/hatchling/builders/wheel.py", line 219, in default_file_selection_options
          raise ValueError(message)
      ValueError: Unable to determine which files to ship inside the wheel using the following heuristics: https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection

      At least one file selection option must be defined in the `tool.hatch.build.targets.wheel` table, see: https://hatch.pypa.io/latest/config/build/

      As an example, if you intend to ship a directory named `foo` that resides within a `src` directory located at the root of your project, you can define the following:

      [tool.hatch.build.targets.wheel]
      packages = ["src/foo"]
      [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.

Potentially the cause of #748

vincentsarago commented 8 months ago

See https://github.com/developmentseed/titiler/discussions/750

The meta package shouldn't be used anyway and we should stop making it available IMO

The meta package has no python code so there is no need for wheels 🤷‍♂️

JackDunnNZ commented 8 months ago

Ah sorry, didn't think to check discussions first

vincentsarago commented 8 months ago

ref https://github.com/pypa/hatch/discussions/1128

vincentsarago commented 8 months ago

fixed in https://github.com/developmentseed/titiler/commit/a6af70307bd29ad5f4b48adc59dab99c5e7391a5