`setup-py-generation` generates a `setup.py` for a...
# general
r
setup-py-generation
generates a
setup.py
for a
python_distribution
target, but is it possible to actually output the
setup.py
file?
g
I'm new here, but I wonder if pants --keep-sandboxes=always would allow you to snag the generated
setup.py
.
b
pants export-codegen path/to:target
can output the codegen for some things. Does it work for this case?
r
Re: @gentle-flower-25372 - Yes, I can find the
setup.py
that I need in the sandbox! Specifically, in the sandbox for
Run setuptools.build_meta:__legacy__
. Unfortunately, the reason I need to do this in the first place is because for this particualr target,
package
takes extremely long to run. If I need to use
--keep-sandboxes=always
, then I still need to run
package
. However, this does lead me in the right direction to find out if there's a way to generate
setup.py
without
package
Re: @broad-processor-92400 - It looks like that specifically need an
export-codegen
target?
Copy code
15:48:03.95 [WARN] No codegen files/targets matched. All codegen target types: experimental_wrap_as_python_sources, experimental_wrap_as_resources, file, resource, vcs_version
g
@rich-london-74860
export-codegen
is a "goal" -- so...
Copy code
pants export-codegen <target>
If you need help finding the target you can list them all with
Copy code
pants list ::
r
I have provided the target. That error is with a target. I believe it’s saying the target is not appropriate for
export-codegen
g
What's the target?
r
python_distribution
, according to that error message, it says I need
Copy code
experimental_wrap_as_python_sources, experimental_wrap_as_resources, file, resource, vcs_version
b
Hm, maybe this doesn’t hook into that goal. Can you try passing a glob like
path/to::
? In case it’s under a different name
1
h
Yeah, I don't think this hooks in to codegen, so
export-codegen
won't do it
👍 1