Skip to content

Commit

Permalink
Merge pull request #19 from python-project-templates/tkp/rename
Browse files Browse the repository at this point in the history
Prep for rename of folders/projects
  • Loading branch information
timkpaine authored Oct 14, 2024
2 parents 33cc159 + 02e55f2 commit 65b6f3e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
30 changes: 22 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,42 @@ help:
print-%:
@echo '$*=$($*)'

UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
SED = sed -i
endif
ifeq ($(UNAME), Darwin)
SED = sed -i '' -e
endif


.PHONY: gen-python
gen-python: ## regenerate the python template from scratch
mkdir -p ../python-template && cd ../python-template && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes
copier copy -w . ../python-template --data-file examples/python.yml
cd ../python-template && $(SED) 's#_src_path: .#_src_path: https://github.com/python-project-templates/base.git#g' ./.copier-answers.yml

.PHONY: gen-cpp
gen-cpp: ## regenerate the c++ template from scratch
mkdir -p ../cpp-template && cd ../cpp-template && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes
copier copy -w . ../cpp-template --data-file examples/cpp.yml
mkdir -p ../python-template-cpp && cd ../python-template-cpp && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes
copier copy -w . ../python-template-cpp --data-file examples/cpp.yml
cd ../python-template-cpp && $(SED) 's#_src_path: .#_src_path: https://github.com/python-project-templates/base.git#g' ./.copier-answers.yml

.PHONY: gen-js
gen-js: ## regenerate the js template from scratch
mkdir -p ../js-template && cd ../js-template && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes
copier copy -w . ../js-template --data-file examples/js.yml
mkdir -p ../python-template-js && cd ../python-template-js && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes
copier copy -w . ../python-template-js --data-file examples/js.yml
cd ../python-template-js && $(SED) 's#_src_path: .#_src_path: https://github.com/python-project-templates/base.git#g' ./.copier-answers.yml

.PHONY: gen-jupyter
gen-jupyter: ## regenerate the jupyter template from scratch
mkdir -p ../jupyter-template && cd ../jupyter-template && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes
copier copy -w . ../jupyter-template --data-file examples/jupyter.yml
mkdir -p ../python-template-jupyter && cd ../python-template-jupyter && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes
copier copy -w . ../python-template-jupyter --data-file examples/jupyter.yml
cd ../python-template-jupyter && $(SED) 's#_src_path: .#_src_path: https://github.com/python-project-templates/base.git#g' ./.copier-answers.yml

.PHONY: gen-rust
gen-rust: ## regenerate the rust template from scratch
mkdir -p ../rust-template && cd ../rust-template && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes
copier copy -w . ../rust-template --data-file examples/rust.yml
mkdir -p ../python-template-rust && cd ../python-template-rust && rm -rf ./* && rm -rf .copier-answers.yml .gitignore .github .gitattributes
copier copy -w . ../python-template-rust --data-file examples/rust.yml
cd ../python-template-rust && $(SED) 's#_src_path: .#_src_path: https://github.com/python-project-templates/base.git#g' ./.copier-answers.yml

2 changes: 1 addition & 1 deletion examples/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ add_extension: cpp
email: [email protected]
github: python-project-templates
project_description: A C++-Python project template
project_name: cpp template
project_name: python template cpp
python_version_primary: '3.11'
team: Python Project Template Authors
2 changes: 1 addition & 1 deletion examples/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ add_extension: js
email: [email protected]
github: python-project-templates
project_description: A JavaScript-Python project template
project_name: js template
project_name: python template js
python_version_primary: '3.11'
team: Python Project Template Authors
2 changes: 1 addition & 1 deletion examples/jupyter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ add_extension: jupyter
email: [email protected]
github: python-project-templates
project_description: A Jupyter-Python project template
project_name: jupyter template
project_name: python template jupyter
python_version_primary: '3.11'
team: Python Project Template Authors
2 changes: 1 addition & 1 deletion examples/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ add_extension: rust
email: [email protected]
github: python-project-templates
project_description: A Rust-Python project template
project_name: rust template
project_name: python template rust
python_version_primary: '3.9'
team: Python Project Template Authors

0 comments on commit 65b6f3e

Please sign in to comment.