cook-build 0.7.0__tar.gz → 0.7.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {cook_build-0.7.0/src/cook_build.egg-info → cook_build-0.7.1}/PKG-INFO +1 -1
  2. {cook_build-0.7.0 → cook_build-0.7.1}/pyproject.toml +1 -1
  3. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook/task.py +4 -4
  4. {cook_build-0.7.0 → cook_build-0.7.1/src/cook_build.egg-info}/PKG-INFO +1 -1
  5. {cook_build-0.7.0 → cook_build-0.7.1}/tests/test_manager.py +5 -8
  6. {cook_build-0.7.0 → cook_build-0.7.1}/LICENSE +0 -0
  7. {cook_build-0.7.0 → cook_build-0.7.1}/README.md +0 -0
  8. {cook_build-0.7.0 → cook_build-0.7.1}/README.rst +0 -0
  9. {cook_build-0.7.0 → cook_build-0.7.1}/setup.cfg +0 -0
  10. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook/__init__.py +0 -0
  11. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook/__main__.py +0 -0
  12. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook/actions.py +0 -0
  13. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook/contexts.py +0 -0
  14. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook/controller.py +0 -0
  15. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook/manager.py +0 -0
  16. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook/util.py +0 -0
  17. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook_build.egg-info/SOURCES.txt +0 -0
  18. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook_build.egg-info/dependency_links.txt +0 -0
  19. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook_build.egg-info/entry_points.txt +0 -0
  20. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook_build.egg-info/requires.txt +0 -0
  21. {cook_build-0.7.0 → cook_build-0.7.1}/src/cook_build.egg-info/top_level.txt +0 -0
  22. {cook_build-0.7.0 → cook_build-0.7.1}/tests/test_actions.py +0 -0
  23. {cook_build-0.7.0 → cook_build-0.7.1}/tests/test_contexts.py +0 -0
  24. {cook_build-0.7.0 → cook_build-0.7.1}/tests/test_controller.py +0 -0
  25. {cook_build-0.7.0 → cook_build-0.7.1}/tests/test_examples.py +0 -0
  26. {cook_build-0.7.0 → cook_build-0.7.1}/tests/test_main.py +0 -0
  27. {cook_build-0.7.0 → cook_build-0.7.1}/tests/test_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cook-build
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: A task-centric build system with simple declarative recipes specified in Python
5
5
  Author: Till Hoffmann
6
6
  License: BSD-3-Clause
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cook-build"
3
- version = "0.7.0"
3
+ version = "0.7.1"
4
4
  description = "A task-centric build system with simple declarative recipes specified in Python"
5
5
  readme = "README.md"
6
6
  license = {text = "BSD-3-Clause"}
@@ -34,12 +34,12 @@ class Task:
34
34
  location: tuple[str, int] | None = None,
35
35
  ) -> None:
36
36
  self.dependencies = dependencies or []
37
+ self.targets = [Path(path) for path in (targets or [])]
37
38
  if name is None:
38
- if not self.dependencies:
39
- raise ValueError("name is required if there are no dependencies")
40
- name = str(self.dependencies[0])
39
+ if not self.targets:
40
+ raise ValueError("'name' is required if there are no targets.")
41
+ name = str(self.targets[0])
41
42
  self.name = name
42
- self.targets = [Path(path) for path in (targets or [])]
43
43
  self.action = action
44
44
  self.task_dependencies = task_dependencies or []
45
45
  self.location = location or util.get_location()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cook-build
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: A task-centric build system with simple declarative recipes specified in Python
5
5
  Author: Till Hoffmann
6
6
  License: BSD-3-Clause
@@ -109,15 +109,12 @@ def test_dependency_graph_cycle(m: Manager) -> None:
109
109
  m.resolve_dependencies()
110
110
 
111
111
 
112
- def test_optional_name_from_first_dependency(m: Manager) -> None:
113
- Path("input.txt").write_text("input")
112
+ def test_optional_name_from_first_target(m: Manager) -> None:
114
113
  with normalize_dependencies():
115
- task = m.create_task(dependencies=["input.txt"])
116
- assert task.name == "input.txt"
114
+ task = m.create_task(targets=["output.txt"])
115
+ assert task.name == "output.txt"
117
116
 
118
117
 
119
- def test_optional_name_requires_dependencies(m: Manager) -> None:
120
- with pytest.raises(
121
- ValueError, match="name is required if there are no dependencies"
122
- ):
118
+ def test_optional_name_requires_targets(m: Manager) -> None:
119
+ with pytest.raises(ValueError, match="'name' is required if there are no targets"):
123
120
  m.create_task()
File without changes
File without changes
File without changes
File without changes
File without changes