Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas McDonald committed Oct 12, 2023
1 parent c4f22de commit c470ddb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions TestModels/SharedMakefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,8 @@ STANDARD_LIBRARY_PATH := $(PROJECT_ROOT)/dafny-dependencies/StandardLibrary
CODEGEN_CLI_ROOT := $(PROJECT_ROOT)/../codegen/smithy-dafny-codegen-cli
GRADLEW := $(PROJECT_ROOT)/../codegen/gradlew

# Returns the name of the Python module under Make.
# This cannot be statically defined, as this changes with dependency generation.
define GetPythonModuleName
$(shell grep -m 1 polymorph_package_name runtimes/python/pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)
endef
# Returns the name of the Python module as stored in the project's build configuration file (pyproject.toml).
PYTHON_MODULE_NAME := $(shell grep -m 1 polymorph_package_name $(LIBRARY_ROOT)/runtimes/python/pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)

########################## Dafny targets

Expand Down Expand Up @@ -406,7 +403,6 @@ _python_revert_underscore_dependency_extern_names:
$(patsubst %, $(MAKE) -C $(PROJECT_ROOT)/% _python_revert_underscore_extern_names;, $(LIBRARIES))

# Move Dafny-generated code into its expected location in the Python module
_mv_internaldafny_python: PYTHON_MODULE_NAME=$(call GetPythonModuleName)
_mv_internaldafny_python:
# Remove any previously generated Dafny code in src/, then copy in newly-generated code
rm -rf runtimes/python/src/$(PYTHON_MODULE_NAME)/internaldafny/generated/
Expand Down

0 comments on commit c470ddb

Please sign in to comment.