bluesky / hklpy

Diffractometer computation library with ophyd pseudopositioner support
https://blueskyproject.io/hklpy
BSD 3-Clause "New" or "Revised" License
4 stars 12 forks source link

BUG: packaging error - "pkgdemo" #322

Closed prjemian closed 8 months ago

prjemian commented 8 months ago

V1.1.0rc1 PyPA source dist published on PyPI but conda-forge recipe fails with exception importlib.metadata.PackageNotFoundError: No package metadata was found for pkgdemo. Here is the problem: https://github.com/bluesky/hklpy/blob/a3f9718600dafc62c90cbdc4a51ec2b6571ccc40/hkl/__init__.py#L25

The text pkgdemo should be replaced by this package's name: hkl.

prjemian commented 8 months ago

Seems like a rookie mistake but this (not replacing pkgdemo with the current package name) happens far too often when transitioning the package versioning from versioneer to setuptools-scm. Just easy to overlook this one item.

prjemian commented 8 months ago

Define a symbol with the package name and then use here instead of verbatim text.

prjemian commented 8 months ago

Use the name as defined here: https://github.com/bluesky/hklpy/blob/a3f9718600dafc62c90cbdc4a51ec2b6571ccc40/pyproject.toml#L9

prjemian commented 8 months ago
In [1]: from importlib.metadata import version

In [2]: version("hklpy")
Out[2]: '1.1.0rc1'
prjemian commented 8 months ago

With this change:

In [1]: from importlib.metadata import version

In [2]: version("hklpy")
Out[2]: '1.1.0rc2.dev1+g1d2a8cd'