Skip to content

Install package data#3999

Open
avalentino wants to merge 1 commit intoUnidata:mainfrom
avalentino:bugfix/package-data
Open

Install package data#3999
avalentino wants to merge 1 commit intoUnidata:mainfrom
avalentino:bugfix/package-data

Conversation

@avalentino
Copy link
Contributor

Description Of Changes

The pyproject.toml file has been updated to install package data needed at runtime.
More specifically the following files and directioiries have been included:

  • metpy/static-data-manifest.txt
  • metpy/plots/_static
  • metpy/plots/colortable_files
  • metpy/plots/nexrad_tables

Checklist

  • Closes #xxxx
  • Tests added
  • Fully documented

@avalentino avalentino requested a review from a team as a code owner February 7, 2026 18:11
@avalentino avalentino requested review from dopplershift and removed request for a team February 7, 2026 18:11
@dopplershift
Copy link
Member

Can you share some context on why this is needed? AFAIU, this should be handled for us by setuptools-scm. If I do python -m build --wheel on main and inspect the generated wheel I see:

❯ unzip -l dist/metpy-1.7.0.post281+g5ea8dc574-py3-none-any.whl
Archive:  dist/metpy-1.7.0.post281+g5ea8dc574-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
      525  02-06-2025 21:16   metpy/__init__.py
     1332  02-06-2025 21:16   metpy/_version.py
      823  02-16-2024 19:46   metpy/_warnings.py
     5854  05-23-2025 19:43   metpy/cbook.py
    11148  02-16-2024 05:13   metpy/deprecation.py
      285  12-14-2023 20:29   metpy/future.py
     2178  02-16-2024 19:50   metpy/package_tools.py
      826  02-16-2024 00:44   metpy/pandas.py
    24858  05-23-2025 19:43   metpy/static-data-manifest.txt
    11806  09-03-2025 18:35   metpy/testing.py
    15097  01-09-2026 21:35   metpy/units.py
    65473  12-23-2025 21:52   metpy/xarray.py
      189  03-30-2022 20:28   metpy/_vendor/__init__.py
     2816  02-18-2024 02:05   metpy/_vendor/xarray.py
     1085  12-14-2023 20:30   metpy/calc/__init__.py
    46972  01-09-2026 21:35   metpy/calc/basic.py
    10773  01-09-2025 18:04   metpy/calc/cross_sections.py
      325  12-14-2023 20:30   metpy/calc/exceptions.py
    26494  08-18-2025 19:48   metpy/calc/indices.py
    73179  05-23-2025 19:43   metpy/calc/kinematics.py
   198357  05-23-2025 19:43   metpy/calc/thermo.py
    82702  12-05-2025 00:06   metpy/calc/tools.py
     7608  09-03-2025 18:50   metpy/calc/turbulence.py
     6851  05-23-2025 19:43   metpy/constants/__init__.py
     2978  05-23-2025 19:43   metpy/constants/default.py
      872  05-23-2025 19:43   metpy/constants/nounit.py
      778  12-14-2023 20:30   metpy/interpolate/__init__.py
    10454  05-23-2025 19:43   metpy/interpolate/geometry.py
    12842  02-06-2025 21:16   metpy/interpolate/grid.py
     7900  01-09-2025 18:04   metpy/interpolate/one_dimension.py
    13724  05-23-2025 19:43   metpy/interpolate/points.py
     6754  01-09-2025 18:04   metpy/interpolate/slices.py
     4458  02-06-2025 21:16   metpy/interpolate/tools.py
     1305  12-14-2023 20:30   metpy/io/__init__.py
   228959  01-09-2026 21:35   metpy/io/_metar_parser.py
    12327  02-06-2025 21:16   metpy/io/_tools.py
   114036  05-23-2025 19:43   metpy/io/gempak.py
    18521  12-05-2025 00:06   metpy/io/gini.py
    20075  01-09-2026 21:35   metpy/io/metar.py
   119894  01-09-2026 21:35   metpy/io/nexrad.py
     7650  07-02-2025 18:38   metpy/io/station_data.py
     5899  01-09-2026 21:35   metpy/io/text.py
      203  03-30-2022 20:28   metpy/io/_nexrad_msgs/__init__.py
    43236  03-30-2022 20:28   metpy/io/_nexrad_msgs/msg18.py
    18946  03-30-2022 20:28   metpy/io/_nexrad_msgs/msg3.py
     1851  05-23-2025 19:43   metpy/plots/__init__.py
     9186  01-09-2026 21:35   metpy/plots/_util.py
     2810  01-09-2025 18:04   metpy/plots/cartopy_utils.py
     8716  01-09-2025 18:04   metpy/plots/ctables.py
    93801  05-23-2025 19:43   metpy/plots/declarative.py
     8548  05-23-2025 19:43   metpy/plots/mapping.py
    43589  02-06-2025 21:16   metpy/plots/patheffects.py
    39092  12-14-2023 20:30   metpy/plots/plot_areas.py
    41282  05-23-2025 19:43   metpy/plots/skewt.py
    27950  01-09-2026 21:35   metpy/plots/station_plot.py
     9211  12-05-2025 00:06   metpy/plots/text.py
    10744  01-09-2025 18:04   metpy/plots/wx_symbols.py
     8107  03-30-2022 20:28   metpy/plots/_static/metpy_150x150.png
    10814  03-30-2022 20:28   metpy/plots/_static/metpy_75x75.png
    27463  03-30-2022 20:28   metpy/plots/_static/unidata_150x150.png
    11438  03-30-2022 20:28   metpy/plots/_static/unidata_75x75.png
     2396  03-30-2022 20:28   metpy/plots/colortable_files/Carbone42.tbl
     6200  03-30-2022 20:28   metpy/plots/colortable_files/NWS8bitVel.tbl
      464  03-30-2022 20:28   metpy/plots/colortable_files/NWSReflectivity.tbl
      348  03-30-2022 20:28   metpy/plots/colortable_files/NWSReflectivityExpanded.tbl
      273  03-30-2022 20:28   metpy/plots/colortable_files/NWSSpectrumWidth.tbl
     6014  03-30-2022 20:28   metpy/plots/colortable_files/NWSStormClearReflectivity.tbl
      507  03-30-2022 20:28   metpy/plots/colortable_files/NWSVelocity.tbl
     4526  03-30-2022 20:28   metpy/plots/colortable_files/WVCIMSS.tbl
     6138  03-30-2022 20:28   metpy/plots/colortable_files/ir_bd.tbl
     1798  03-30-2022 20:28   metpy/plots/colortable_files/ir_drgb.tbl
     1767  03-30-2022 20:28   metpy/plots/colortable_files/ir_rgbv.tbl
     7936  03-30-2022 20:28   metpy/plots/colortable_files/ir_tpc.tbl
     4929  03-30-2022 20:28   metpy/plots/colortable_files/ir_tv1.tbl
      921  03-30-2022 20:28   metpy/plots/colortable_files/precipitation.tbl
     6014  03-30-2022 20:28   metpy/plots/colortable_files/rainbow.tbl
     3658  03-30-2022 20:28   metpy/plots/colortable_files/wv_tpc.tbl
    51028  03-30-2022 20:28   metpy/plots/fonts/wx_symbols.ttf
      328  09-03-2025 18:35   metpy/plots/fonts/wx_symbols_license.txt
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/cc_table.tbl
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/et_table.tbl
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/hmc_table.tbl
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/kdp_table.tbl
       80  03-30-2022 20:28   metpy/plots/nexrad_tables/lcr_tabl.tbl
       40  03-30-2022 20:28   metpy/plots/nexrad_tables/ml_table.tbl
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/osw_table.tbl
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/precip_table.tbl
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/ref_table.tbl
       80  03-30-2022 20:28   metpy/plots/nexrad_tables/ref_table8.tbl
       80  03-30-2022 20:28   metpy/plots/nexrad_tables/spw_table.tbl
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/srm_table.tbl
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/ulr_table.tbl
       80  03-30-2022 20:28   metpy/plots/nexrad_tables/vad_table.tbl
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/vel_table.tbl
       80  03-30-2022 20:28   metpy/plots/nexrad_tables/vel_table8.tbl
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/vil_table.tbl
       50  03-30-2022 20:28   metpy/plots/nexrad_tables/vwp_table.tbl
      160  03-30-2022 20:28   metpy/plots/nexrad_tables/zdr_table.tbl
      454  05-23-2025 19:43   metpy/remote/__init__.py
    27436  01-09-2026 21:35   metpy/remote/aws.py
      742  02-10-2026 00:14   metpy-1.7.0.post281+g5ea8dc574.dist-info/licenses/AUTHORS.txt
     1521  02-10-2026 00:14   metpy-1.7.0.post281+g5ea8dc574.dist-info/licenses/LICENSE
     9054  02-10-2026 00:14   metpy-1.7.0.post281+g5ea8dc574.dist-info/METADATA
       91  02-10-2026 00:14   metpy-1.7.0.post281+g5ea8dc574.dist-info/WHEEL
       57  02-10-2026 00:14   metpy-1.7.0.post281+g5ea8dc574.dist-info/entry_points.txt
        6  02-10-2026 00:14   metpy-1.7.0.post281+g5ea8dc574.dist-info/top_level.txt
     9393  02-10-2026 00:14   metpy-1.7.0.post281+g5ea8dc574.dist-info/RECORD

Which includes all the files you've manually added here.

@avalentino
Copy link
Contributor Author

Sorry for no providing all the context.
I'm one of the maintainers of the Debian package for MetPy.
In our case we use the source tarball directly generated by github for tags.
To build the package I use something like the following command:

env SETUPTOOLS_SCM_PRETEND_VERSION=1.7.1 python3 -m build

The actual build process is actually a little bit more complex and it is managed by the tools that we use to generated the Debian package itself (.deb).

I understand that my workflow is pretty unusual and clearly setuptools-scm cannot work properly without a git repository or .dist-info metadata, so please feel free to ignore the PR.

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

Successfully merging this pull request may close these issues.

2 participants