Browse Source

simplified and improved

Médéric Hurier 4 months ago
parent
commit
9ece647ce2

+ 2
- 2
cookiecutter.json View File

@@ -1,10 +1,10 @@
1 1
 {
2 2
     "name": "project",
3
+    "user": "anonymous",
3 4
     "email": "anon@local",
4 5
     "author": "anonymous",
5 6
     "python": "3.7.0",
6 7
     "license": "GPLv3",
7 8
     "control": "github.com",
8
-    "username": "anonymous",
9
-    "homepage": "https://{{cookiecutter.control}}/{{cookiecutter.username}}/{{cookiecutter.name}}"
9
+    "homepage": "https://{{cookiecutter.control}}/{{cookiecutter.user}}/{{cookiecutter.name}}"
10 10
 }

+ 0
- 1
{{cookiecutter.name}}/.gitignore View File

@@ -12,4 +12,3 @@ __pycache__/
12 12
 .mypy_cache/
13 13
 .pytest_cache/
14 14
 .ipynb_checkpoints/
15
-

+ 4
- 8
{{cookiecutter.name}}/Makefile View File

@@ -1,17 +1,13 @@
1
-all: ;
2
-
3
-include */Makefile
4
-
5 1
 venv:
6 2
 	python -m venv venv --clear
7 3
 
8 4
 init: venv
9 5
 	for mk in $(wildcard */Makefile); do make -s -f $$mk init-$$(dirname $$mk); done
10 6
 
11
-hook: venv
12
-	for mk in $(wildcard */Makefile); do make -s -f $$mk hook-$$(dirname $$mk); done
13
-
14 7
 clean:
15 8
 	for mk in $(wildcard */Makefile); do make -s -f $$mk clean-$$(dirname $$mk); done
16 9
 
17
-clean-build: ## remove build artifacts
10
+commit: venv
11
+	for mk in $(wildcard */Makefile); do make -s -f $$mk commit-$$(dirname $$mk); done
12
+
13
+include */Makefile

+ 2
- 2
{{cookiecutter.name}}/dev/Makefile View File

@@ -2,8 +2,6 @@ init-dev:
2 2
 	venv/bin/pip install -e .
3 3
 	venv/bin/pip install '.[dev]'
4 4
 
5
-hook-dev: ;
6
-
7 5
 clean-dev:
8 6
 	find . -name '*~' -exec rm -f {} +
9 7
 	find . -name '*.pyc' -exec rm -f {} +
@@ -11,3 +9,5 @@ clean-dev:
11 9
 	find . -name '*.egg' -exec rm -f {} +
12 10
 	find . -name '*.egg-info' -exec rm -fr {} +
13 11
 	find . -name '__pycache__' -exec rm -fr {} +
12
+
13
+commit-dev: ;

+ 0
- 6
{{cookiecutter.name}}/hooks/Makefile View File

@@ -1,6 +0,0 @@
1
-init-hooks:
2
-	cp hooks/pre-commit .git/hooks/pre-commit
3
-
4
-hook-hooks: ;
5
-
6
-clean-hooks: ;

+ 0
- 3
{{cookiecutter.name}}/hooks/pre-commit View File

@@ -1,3 +0,0 @@
1
-#!/bin/sh
2
-
3
-make hook

+ 2
- 0
{{cookiecutter.name}}/setup.py View File

@@ -25,6 +25,7 @@ info = dict(
25 25
     long_description=open("README.md", "r").read(),
26 26
     url="{{cookiecutter.homepage}}",
27 27
     packages=["{{cookiecutter.name}}"],
28
+    package_dir={},
28 29
     keywords="sample project template",
29 30
     classifiers=[
30 31
         "Development Status :: 3 - Alpha",
@@ -35,6 +36,7 @@ info = dict(
35 36
     },
36 37
     python_requires=">={{cookiecutter.python}}",
37 38
     install_requires=requires(),
39
+    entry_points={}
38 40
 )
39 41
 
40 42
 if __name__ == "__main__":