Open pb-413 opened 1 month ago
pyospackage
in pyproject.toml
to pyospackage_<your_github>
pyospackage_pb_413
-
) as separators; use underscores (_
) insteadpyospackage_pb_413
( not pyospackage_pb-413
!)src\pyospackage
folder to the same name, pyospackage_<your_github>
src\pyospackage_pb_413
hatch env show
-> grab name; for me, default
hatch env find default
-> grab path ...\hatch\env\virtual\
, 3 levels uphatch env create
hatch build
Note: I had errors when I renamed to a name with hyphens. I think your documentation already mentioned something about that, but it was on a previous page. Here is the error that pointed me to renaming that; hatch seemed to be looking for the same folder name but with underscores instead of hyphens:
> hatch env create
error: subprocess-exited-with-error
Preparing editable metadata (pyproject.toml) did not run successfully.
exit code: 1
[42 lines of output]
# big stack trace
The most likely cause of this is that there is no directory that matches the name of your project (pyospackage_pb_413).
# extra info
References: https://hatch.pypa.io/dev/tutorials/environment/basic-usage/#locating-environments
Just found out there is a command to prune (delete all) or remove (delete named) environments in hatch:
> hatch env
Usage: hatch env [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
create Create environments
find Locate environments
prune Remove all environments
remove Remove environments
run Run commands within project environments
show Show the available environments
Those might be better than locating and manually deleting environments.
This might be a duplicate of #244, or maybe it is just related.
thank you... let's see what @Tyler-Bonnell thinks about the change. i did just merge it!! but actually i think you have a bit more information related to hatch and environments potentially here too. i can look at this more closely later or someone else in our team can do it!
@all-contributors add @pb-413 for code, review
@kierisi
@pb-413 already contributed before to code, review
Glad to see this is a TODO:
https://github.com/pyOpenSci/python-package-guide/blob/a9fc8c19b1b63113fea3b66bd06177c53be2aa5a/tutorials/publish-pypi.md?plain=1#L206C1-L213C4
I will document the steps I take here; if desired, I can make a PR with changes that walk a reader through these steps.
Also, we should consider updating earlier steps (if we want to avoid needing to rename) to create the tutorial package with a better name. e.g.
hatch new pyospackage_<your-github-here>
,hatch new pyospackage_pb-413
.