Skip to content

Commit

Permalink
make work for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
WT-MM committed Nov 25, 2024
1 parent 2c48c6b commit 86a5aac
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pykos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,16 @@ generate-proto:
touch kos_protos/__init__.py

# Fix imports in all generated files
find kos_protos -type f -name "*.py" -exec sed -i '' 's/from kos/from kos_protos/g' {} +
find kos_protos -type f -name "*.py" -exec sed -i '' 's/import kos/import kos_protos/g' {} +
case "$$(uname)" in \
Darwin) \
find kos_protos -type f -name "*.py" -exec sed -i '' 's/from kos/from kos_protos/g' {} + && \
find kos_protos -type f -name "*.py" -exec sed -i '' 's/import kos/import kos_protos/g' {} + \
;; \
*) \
find kos_protos -type f -name "*.py" -exec sed -i 's/from kos/from kos_protos/g' {} + && \
find kos_protos -type f -name "*.py" -exec sed -i 's/import kos/import kos_protos/g' {} + \
;; \
esac
.PHONY: generate-proto


Expand Down

0 comments on commit 86a5aac

Please sign in to comment.