py: Implement __file__ attribute for modules.
diff --git a/unix/main.c b/unix/main.c
index d0222de..03718c2 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -95,6 +95,11 @@
     }
 
     qstr source_name = mp_lexer_source_name(lex);
+    #if MICROPY_PY___FILE__
+    if (input_kind == MP_PARSE_FILE_INPUT) {
+        mp_store_global(MP_QSTR___file__, MP_OBJ_NEW_QSTR(source_name));
+    }
+    #endif
     mp_lexer_free(lex);
 
     /*