hi. is there anyway I can run the `setup-py` goal ...
# general
f
hi. is there anyway I can run the
setup-py
goal with
--version
arguments? similar to
Copy code
$ python dist/my-lib-name/setup.py --version
1.0.0
I have tried the following, but it does not show any output
Copy code
$ ./pants setup-py my-lib-path:my-lib-name -- "--version"
11:37:22.85 [INFO] Writing dist for my-lib-path:my-lib-name under dist/.
Seems that somehow, pants "hides" the output Is there any other way I can view the version of a python_library/python_dist/python_binary?
w
not currently: is
--version
the only setup-py command you’d like the output of, or are there others?
and this is the version that is specified in your
BUILD
file in the
setup_py
struct? https://www.pantsbuild.org/docs/python-setup-py-goal
h
Hmm, I would have expected that
Copy code
./pants setup-py my-lib-path:my-lib-name -- "--version"
to work
👀
Oh, I guess we capture the stdout and don't replay it to the console
If we did we'd get a lot of noise from setup()
Hmmm, what to do...
Well, you can see that output if you run
Copy code
./pants -ldebug setup-py my-lib-path:my-lib-name -- "--version"
The
-ldebug
causes Pants to replay stdout/stderr from processes it invokes
@full-oyster-41619 Is that sufficient?
f
apparently I do not get this on debug mode. full output
this is my BUILD file
Copy code
python_library(
    name = "nci-core.lib",
    sources = ['**/*.py'],
    dependencies = [
        ...
    ]
)

python_distribution(
    name="nci-core.dist",
    dependencies = [
        ":nci-core.lib"
    ],
    provides=setup_py(
        name="nci-core",
        description="NCI Core",
        version="1.0.0"
    )
)