Skip to content

'pyhf.data' needs to be listed as a pacakge as installing as data is deprecated #1880

@matthewfeickert

Description

@matthewfeickert

In the sdist and wheel builds in CI, build is now giving a SetuptoolsDeprecationWarning:

/tmp/build-env-s1h7fdpl/lib/python3.10/site-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'pyhf.data' as data is deprecated, please list it in `packages`.
    !!
creating build/lib/pyhf/data
    ############################
    # Package would be ignored #
copying src/pyhf/data/citation.bib -> build/lib/pyhf/data
creating build/lib/pyhf/schemas
copying src/pyhf/schemas/HistFactorySchema.dtd -> build/lib/pyhf/schemas
creating build/lib/pyhf/schemas/1.0.0
copying src/pyhf/schemas/1.0.0/defs.json -> build/lib/pyhf/schemas/1.0.0
copying src/pyhf/schemas/1.0.0/jsonpatch.json -> build/lib/pyhf/schemas/1.0.0
copying src/pyhf/schemas/1.0.0/measurement.json -> build/lib/pyhf/schemas/1.0.0
copying src/pyhf/schemas/1.0.0/model.json -> build/lib/pyhf/schemas/1.0.0
copying src/pyhf/schemas/1.0.0/patchset.json -> build/lib/pyhf/schemas/1.0.0
copying src/pyhf/schemas/1.0.0/workspace.json -> build/lib/pyhf/schemas/1.0.0
    ############################
    Python recognizes 'pyhf.data' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.
    Currently 'pyhf.data' is only added to the distribution because it may
    contain data files, but this behavior is likely to change in future
    versions of setuptools (and therefore is considered deprecated).
    Please make sure that 'pyhf.data' is included as a package by using
    the `packages` configuration field or the proper discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).
    You can read more about "package discovery" and "data files" on setuptools
    documentation page.
!!
  check.warn(importable)
/tmp/build-env-s1h7fdpl/lib/python3.10/site-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'pyhf.schemas' as data is deprecated, please list it in `packages`.
    !!
    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'pyhf.schemas' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.
    Currently 'pyhf.schemas' is only added to the distribution because it may
    contain data files, but this behavior is likely to change in future
    versions of setuptools (and therefore is considered deprecated).
    Please make sure that 'pyhf.schemas' is included as a package by using
    the `packages` configuration field or the proper discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).
    You can read more about "package discovery" and "data files" on setuptools
    documentation page.
!!

Metadata

Metadata

Labels

packagingsetup.py, setup.cfg, pyproject.toml, and friends

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions