Closed matthewfeickert closed 2 years ago
I'm going to tag @henryiii and @agoose77 as they both have more experience with hatchling
then @alexander-held or I do.
(Henry, Angus, not sure if there is a way to avoid the annoying print of the entire LICENSE
either — that would be terrible for something like pyhf
that uses Apache 2.0).
You probably need to file an issue with the hatch
developers as I see similar problems in mapyde
and that uses the scikit-hep cookiecutter repository
$ python -m pip show mapyde
Name: mapyde
Version: 0.2.3
Summary: Generation, simulation, analysis, and statistical inference in one go.
Home-page:
Author:
Author-email: Giordon Stark <kratsg@gmail.com>
License:
Location: /Users/kratsg/mario-mapyde/venv/lib/python3.9/site-packages
Requires: in-place, jinja2, toml, typer
Required-by:
where our pyproject.toml
follows the guidelines for sure in the hatch metadata documentation.
I think the home-page
is project.url
for pyproject.toml
, as the other project URLs are typically picked up by pypi (https://pypi.org/project/mapyde/).
Homepage is supposed to be empty, it's been deprecated as "redundant and confusing" as part of PEP 621. Same thing with Author
if Author-email
is filled.
As to why there are no files, there is no package in this repo. If you look inside src, you'll see there are just some random files, including __init__.py
. This would be terrible, as it would install to site-packages/__init__.py
(and only one package could do that before you'd have conflicts). But hatchling will refuse to pick it up. You need to make a package out of it:
mkdir src/pyhf_to_combine_converter
mv src/* src/pyhf_to_combine_converter/.
Homepage is supposed to be empty, it's been deprecated as "redundant and confusing" as part of PEP 621. Same thing with
Author
ifAuthor-email
is filled.
Ah interesting. Good to know for the future.
As to why there are no files, there is no package in this repo. If you look inside src, you'll see there are just some random files, including
__init__.py
. This would be terrible, as it would install tosite-packages/__init__.py
(and only one package could do that before you'd have conflicts). But hatchling will refuse to pick it up. You need to make a package out of it:mkdir src/pyhf_to_combine_converter mv src/* src/pyhf_to_combine_converter/.
Whoops yeah that would indeed do it. I should have checked that things were packaged before filing this. @peterridolfi, @henryiii's suggestions will definitely work, so please update the directory layout for this (though as this is under version control use git mv
).
As you were following the https://packaging.python.org/en/latest/tutorials/packaging-projects/ that Henry and I have both made contributions to if you let us know later on what parts were unclear I can see if there might be some slight revisions to the text that may warrant a PR to https://github.com/pypa/packaging.python.org
In release
v0.0.2
some of the project metadatahttps://github.com/peterridolfi/Pyhf-to-Combine-converter/blob/2d154ad73ab460b8a6b7512f1cc8df5fb102ff0a/pyproject.toml#L11-L30
https://github.com/peterridolfi/Pyhf-to-Combine-converter/blob/2d154ad73ab460b8a6b7512f1cc8df5fb102ff0a/pyproject.toml#L34-L36
isn't getting picked up properly during
hatchling
's build.Example: Homepage is empty
More importantly, the install of the wheel isn't actually installing any files