setup.py
changeset 42451 810f66b468cd
parent 42175 cd1bede340b0
child 42453 94167e701e12
--- a/setup.py	Thu Jun 13 23:28:31 2019 +0300
+++ b/setup.py	Wed May 29 13:27:56 2019 +0200
@@ -556,10 +556,17 @@
         if self.distribution.pure:
             modulepolicy = 'py'
         elif self.build_lib == '.':
-            # in-place build should run without rebuilding C extensions
-            modulepolicy = 'allow'
+            # in-place build should run without rebuilding C
+            # and Rust extensions
+            if hgrustext == 'cpython':
+                modulepolicy = 'rust+c-allow'
+            else:
+                modulepolicy = 'allow'
         else:
-            modulepolicy = 'c'
+            if hgrustext == 'cpython':
+                modulepolicy = 'rust+c'
+            else:
+                modulepolicy = 'c'
 
         content = b''.join([
             b'# this file is autogenerated by setup.py\n',