hundreds-father-404
10/01/2020, 5:24 PMpackage
goal. One other disruptive change we want to do before landing 2.0: rename python_binary
to pex_binary
python_tests
to pytest_tests
pyinstaller_binary
. We should stop privileging the status quo.
2. More accurately model that Pants is an orchestrator for the tools you already use; we’re not inventing some binary format, which might be implied with the status quo.
We know it’s disruptive. We’ll use a deprecation cycle + give a script or sed regex snippet to automatically fix this.
Any thoughts on this?witty-crayon-22786
10/01/2020, 5:27 PMwitty-crayon-22786
10/01/2020, 5:27 PMwitty-crayon-22786
10/01/2020, 5:27 PMwooden-thailand-8386
10/01/2020, 5:28 PMpython_tests(
mode="pytest",
...
)
hundreds-father-404
10/01/2020, 5:31 PMtimeout
make sense regardless of the mode you’re using. If it’s roughly the same, then we could use the same target.
So, likely python_tests
should not yet be changed, then. Until we have better scoped other test runners like Hypothesis
I think we would still want to change pex_binary
though. It has lots of very custom fields like ignore_warnings
, which is specific to the Pex API. It’s likely that pyinstaller_binary
has its own custom set of fields like that, specific to the Pyinstaller API. That is, it’s unlikely we’d want to use one target for multiple different types of binarieswooden-thailand-8386
10/01/2020, 5:32 PMhundreds-father-404
10/01/2020, 5:33 PMpython_library
and python_tests
are both very generic, they’re probably good names already
In contrast, python_binary
is much more generic than it really should be. It’s not any Python binary, it’s specifically metadata to convert your code into a Pexwitty-crayon-22786
10/01/2020, 5:34 PMwitty-crayon-22786
10/01/2020, 5:34 PMpython_tests
either, for example, so it won’t collideaverage-vr-56795
10/01/2020, 10:20 PMpex_binary
, don't have super strong feelings about pytest either way - I can certainly see that there's a lot more overlap in semantics and fields between test runners. On the other hand, in v1 we had junit_tests
not java or JVM...hundreds-father-404
10/01/2020, 10:21 PMpyinstaller_binary
, I still think pex_binary
is a good name. It makes things more declarative.
But I generally try to avoid premature changes etcaverage-vr-56795
10/01/2020, 10:23 PMwitty-crayon-22786
10/01/2020, 10:25 PMwitty-crayon-22786
10/01/2020, 10:25 PMwitty-crayon-22786
10/01/2020, 10:26 PMaverage-vr-56795
10/01/2020, 10:27 PMaverage-vr-56795
10/01/2020, 10:28 PMpex_binary
wrap an abstract python_binary
so you can conceptually ./pants run
the thing, but to get a deployable you need to think about packaging formatswitty-crayon-22786
10/01/2020, 10:28 PMhundreds-father-404
10/01/2020, 10:28 PMnaming it “pex binary” does mean that you have to explain pex earlier than you would otherwiseI think this could be a good thing. I suspect we’ve been abstracting over Pex a little too much. At the end of the day, we are wrapping Pex. You are going to need to know what the project is and some of its basics. Being explicit about it might be more clear.
average-vr-56795
10/01/2020, 10:28 PMarchive
wrappers on the `build`/`package` PRwitty-crayon-22786
10/02/2020, 12:08 AM./pants run $pex_binary
won’t create a pexhundreds-father-404
10/02/2020, 12:11 AM./pants package $pex_binary
, I’m not sure they would expect run
to duplicate that.
I’m not seeing a big difference between ./pants run $python_binary
vs. ./pants run $pex_binary
in terms of user expectationswitty-crayon-22786
10/02/2020, 12:36 AMwitty-crayon-22786
10/02/2020, 12:37 AM