[packaging] rstrip fix (#45166)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/45166
Test Plan: Imported from OSS
Reviewed By: suo
Differential Revision: D23852505
Pulled By: zdevito
fbshipit-source-id: 6bb743b37333ae19fc24629686e8d06aef812c50