Page MenuHomePhabricator

packaging: leverage os.path.relpath() in setup.py
ClosedPublic

Authored by martinvonz on Jan 14 2020, 5:18 PM.

Details

Summary

os.path.relpath() has existed since Python 2.6, so we can safely use
it. This fixes a bug in the current code when the common prefix is "/"
(in which case uplevel would be one less than it should).

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Jan 14 2020, 5:18 PM
pulkit accepted this revision.Jan 15 2020, 7:16 AM
This revision is now accepted and ready to land.Jan 15 2020, 7:16 AM
This revision was automatically updated to reflect the committed changes.