Page MenuHomePhabricator

distutils_rust: teach distutils to look for windows libs

Authored by ikostia on Dec 5 2017, 7:10 AM.



Make sure that we can build Rust extensions on Windows.

Test Plan
  • set USERUST=1
  • run FB build script, which invokes fb-hgext's
  • see it not failing

Diff Detail

rFBHGX Facebook Mercurial Extensions
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ikostia created this revision.Dec 5 2017, 7:10 AM
Herald added a reviewer: Restricted Project. · View Herald TranscriptDec 5 2017, 7:10 AM
quark added a subscriber: quark.Dec 5 2017, 3:39 PM
quark added inline comments.

This feels duplicated with line 87. Could you do something like:

if platform.startswith('win-'):
    name = '%s.dll' %
else if platform.startswith('macosx'):
    name = 'lib%s.dylib' %
    name = '' %

return os.path.join(..., name)
ikostia updated this revision to Diff 4126.Dec 5 2017, 3:57 PM

address Jun's comment

ikostia marked an inline comment as done.Dec 5 2017, 3:58 PM
quark accepted this revision.Dec 5 2017, 4:01 PM
This revision is now accepted and ready to land.Dec 5 2017, 4:01 PM
This revision was automatically updated to reflect the committed changes.