by any change is there a pants doc that outlines h...
# general
c
by any change is there a pants doc that outlines how to migrate from pants v1 to pants v2 for python ? We are manually trying to setup the v2 BUILD file for our python target . The one thing that is unclear is how to replace
python_library
goal ( which includes a
provides=setup_py
) in v2. Seems like
python_library
has been replaced with
python_sources
and if you want to specify distribution config then you add the
python_distribution
goal too in the BUILD file ? Is that correct ?
e
I'm not aware of any docs covering that migration process. That said, everything you figured out so far is exactly right.
h
There is this guide 🙂 https://www.pantsbuild.org/v2.4/docs/how-to-upgrade-pants-2-0 It's for Pants 2.4, but hopefully still has some useful stuff. I think that I'd recommend either: 1. Start over cleanly in a branch. This is made more viable via
./pants tailor
+ dependency inference, but still might be too big of a leap depending on your repo. 2. Starting with 2.0, then 2.1, etc. Pants 2.9 is a much more polished experience than 2.0, for sure. But that way you'll get deprecation warnings along the way. This doesn't mean you actually land each of these versions in your repo - only that you get Pants running without deprecation warnings, then try the next one, etc. See https://www.pantsbuild.org/docs/upgrade-tips We're very happy to help along the way also 🙂 Please do ask questions that you have
cc @dry-analyst-73584 who is also working on a migration
d
I'm starting directly with 2.9 because we are so, so, so far behind it's not even funny. I've been taking some notes along the way though and I can share those if they're useful!
🙌 1
h
Iirc, you're on something like 1.17, so that initial step of getting to 1.30 would be too challenging. Right? Makes sense
d
That's the idea.
c
thanks folks for the pointers and links!
❤️ 1
b
@dry-analyst-73584 thanks for taking notes! We would love to have you blog about that adoption process for the benefit of others. Ping me anytime if you'd be interested, and especially if there's anything we can do to help.