Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
* Added support for Python 3.13 (#1056)
* Added support for `.cljc` files (#1097)

### Fixed
* Fix an issue with `basilisp test` standard streams output that can lead to failures on MS-Windows (#1080)
Expand Down
6 changes: 4 additions & 2 deletions src/basilisp/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _is_package(path: str) -> bool:
or Python code file."""
for _, _, files in os.walk(path):
for file in files:
if file.endswith(".lpy") or file.endswith(".py"):
if file.endswith(".lpy") or file.endswith(".py") or file.endswith(".cljc"):
return True
return False

Expand All @@ -122,7 +122,7 @@ def _is_namespace_package(path: str) -> bool:
for file in files:
if file in {"__init__.lpy", "__init__.py"}:
no_inits = False
elif file.endswith(".lpy"):
elif file.endswith(".lpy") or file.endswith(".cljc"):
has_basilisp_files = True
return no_inits and has_basilisp_files

Expand Down Expand Up @@ -161,6 +161,8 @@ def find_spec(
filenames = [
f"{os.path.join(root_path, '__init__')}.lpy",
f"{root_path}.lpy",
f"{os.path.join(root_path, '__init__')}.cljc",
f"{root_path}.cljc",
]
for filename in filenames:
if os.path.isfile(filename):
Expand Down
Loading