-
-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better PyApp integration #1423
Comments
@ofek any thoughts on this so I could start implementing? |
Hey there, sorry I've been busy! I don't have time today to think about the binary naming section but for the [tool.hatch.build.targets.binary.variables]
PYAPP_FULL_ISOLATION = "true" would become [tool.hatch.build.targets.binary.options]
full-isolation = "true" edit: then every key you can transform to the equivalent environment variable using the reverse process and you wouldn't have to document each one but rather link out to the other documentation |
then how would i treat other options that are Cargo-related like |
A variables table like you proposed is fine for arbitrary environment variables. |
So to understand you correctly. Should i split up generic variables and pyapp environment variables in two different sections |
I would say two different sections yes but the former can contain arbitrary environment variables and we would recommend in the documentation that for options specific to PyApp use the options table whereas the other table we would just mention that it's possible to set arbitrary environment variables and give a small example. Basically, although the variables table can support the use case of options we just don't document in the example that it's possible. |
Alrighty, then i'll make this small change. |
I'll name the table |
Sounds good! That might be useful to have as a fundamental build option in future. |
Should the specific build targets also have a differentiation between options and env-vars?
and how should the prios be resolved? I start to think that only keeping the |
|
Yes but get rid of the top level environment variables |
Why not keep them to have a place to not repeat stuff? This would be frequently used I think, e.g. to set an index url extra arg for all outputs. |
Okay, that's fine 👍 |
Implementation and docs are done. Please have a look ;) |
Hi @johannesloibl, I posted on a related issue before seeing this one here: Looks like you have an implementation in the pipeline #1547. I will test to see if this addresses the issue I was having with the project not included in the binary. Posting here to cross-link these related issues. |
Hey, me again ;)
I'd like to request (and maybe even contribute) more integration options for PyApp.
Hatch right now only offers the
scripts
option, which is transforming your project scripts into a bunch of executables. While this may work for some easy use cases, it has following disadvantages:[project.scripts]
is taken into account and[project.gui-scripts]
is ignored.So if your project needs to build both, it is hard to configure different PyApp environment variables for both.
mycustomname
,mycustomname-{version}
or{dist_name}-{version}
.__main__.py
cannot be built ifscript
is left empty. Also other options PyApp provides (PYAPP_EXEC_*
) are not supported.Here an example TOML i could imagine:
This would enable all possible options of PyApp within Hatch and integrate it better.
What do you think? If you like it i could contribute this feature.
The text was updated successfully, but these errors were encountered: