teapot 3.5.4 → 3.6.1

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.
data/lib/teapot/target.rb CHANGED
@@ -1,43 +1,32 @@
1
- # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
20
2
 
21
- require 'pathname'
22
- require 'build/dependency'
23
- require_relative 'definition'
3
+ # Released under the MIT License.
4
+ # Copyright, 2012-2026, by Samuel Williams.
24
5
 
25
- require 'build/environment'
26
- require 'build/rulebook'
6
+ require "pathname"
7
+ require "build/dependency"
8
+ require_relative "definition"
9
+
10
+ require "build/environment"
11
+ require "build/rulebook"
27
12
 
28
13
  module Teapot
14
+ # Raised during build operations.
29
15
  class BuildError < StandardError
30
16
  end
31
17
 
18
+ # A build target.
32
19
  class Target < Definition
33
20
  include Build::Dependency
34
21
 
22
+ # Initialize a new target.
35
23
  def initialize(*)
36
24
  super
37
25
 
38
26
  @build = nil
39
27
  end
40
28
 
29
+ # Make the target immutable after it has been completely defined with dependencies and build rules.
41
30
  def freeze
42
31
  return self if frozen?
43
32
 
@@ -46,6 +35,9 @@ module Teapot
46
35
  super
47
36
  end
48
37
 
38
+ # Define the build block for this target.
39
+ # @parameter block [Proc | Nil] The build block.
40
+ # @returns [Proc | Nil] The build block.
49
41
  def build(&block)
50
42
  if block_given?
51
43
  @build = block
@@ -54,6 +46,7 @@ module Teapot
54
46
  return @build
55
47
  end
56
48
 
49
+ # Update environments with the build block.
57
50
  def update_environments!
58
51
  return unless @build
59
52
 
@@ -1,23 +1,9 @@
1
- # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
20
2
 
3
+ # Released under the MIT License.
4
+ # Copyright, 2012-2026, by Samuel Williams.
5
+
6
+ # @namespace
21
7
  module Teapot
22
- VERSION = "3.5.4"
8
+ VERSION = "3.6.1"
23
9
  end
data/lib/teapot.rb CHANGED
@@ -1,26 +1,7 @@
1
- # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
20
2
 
21
- require "teapot/version"
3
+ # Released under the MIT License.
4
+ # Copyright, 2012-2026, by Samuel Williams.
22
5
 
6
+ require "teapot/version"
23
7
  require "teapot/context"
24
-
25
- module Teapot
26
- end
data/license.md ADDED
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright, 2012-2026, by Samuel Williams.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/notes.md ADDED
@@ -0,0 +1,74 @@
1
+ # Notes
2
+
3
+ These are just some random design notes.
4
+
5
+ ## Target build vs environment
6
+
7
+ It's cumbersome and causes a disconnect between `target.build` and environment provisions. Currently, it's written like this:
8
+
9
+ ```ruby
10
+ define_target "time-library" do |target|
11
+ source_root = target.package.path + "source"
12
+
13
+ target.build do
14
+ build prefix: target.name, static_library: "Time", source_files: source_root.glob("Time/**/*.cpp")
15
+ end
16
+
17
+ target.depends "Build/Files"
18
+ target.depends "Build/Clang"
19
+
20
+ target.depends :platform
21
+ target.depends "Language/C++11", private: true
22
+
23
+ target.depends "Build/Files"
24
+ target.depends "Build/Clang"
25
+
26
+ target.provides "Library/Time" do
27
+ append linkflags [
28
+ ->{build_prefix + target.name + "Time.a"},
29
+ ]
30
+
31
+ append buildflags [
32
+ "-I", ->{source_root},
33
+ ]
34
+ end
35
+ end
36
+ ```
37
+
38
+ Ideally, it's defined all in the environment:
39
+
40
+ ```
41
+ target.provides "Library/Time" do
42
+ append linkflags do
43
+ build prefix: target.name, static_library: "Time", source_files: source_root.glob("Time/**/*.cpp")
44
+ end
45
+
46
+ append buildflags [
47
+ "-I", ->{source_root},
48
+ ]
49
+ end
50
+ ```
51
+
52
+ Perhaps with the ability to share build steps:
53
+
54
+ ```ruby
55
+ append linkflags &target.build
56
+ ```
57
+
58
+ ## Modern format for package definitions.
59
+
60
+ ``` ruby
61
+ define_target "test-project-library" do |target|
62
+ source_root = target.package.path + "source"
63
+
64
+ target.depends "Language/C++14", private: true
65
+
66
+ target.provides "Library/TestProject" do
67
+ append include_paths source_root
68
+
69
+ library_path = build static_library: "TestProject", source_files: source_root.glob("TestProject/**/*.cpp")
70
+
71
+ append linkflags library_path
72
+ end
73
+ end
74
+ ```
data/readme.md ADDED
@@ -0,0 +1,64 @@
1
+ # ![Teapot](materials/teapot.svg)
2
+
3
+ Teapot is a decentralised build tool for managing complex cross-platform projects. It has many goals but it is primarily designed to improve the experience for developers trying to make cross-platform applications and libraries with a minimum of overhead.
4
+
5
+ - Provide useful feedback when dependencies are not met or errors are encountered.
6
+ - Decentralised dependency management allows use within private organisations without exposing code.
7
+ - Generators can simplify the construction of new projects as well as assist with the development of existing ones.
8
+ - The build subsystem provides a simple set of canonical operations for building libraries and executables to minimise configuration overhead.
9
+
10
+ [![Development Status](https://github.com/kurocha/teapot/workflows/Test/badge.svg)](https://github.com/kurocha/teapot/actions?workflow=Test)
11
+
12
+ ## Installation
13
+
14
+ Ensure that you already have a working install of Ruby 2.0.0+ and run the following to install `teapot`:
15
+
16
+ $ gem install teapot
17
+
18
+ ## Usage
19
+
20
+ Please see the [project documentation](https://ioquatix.github.io/teapot/) for more details.
21
+
22
+ - [Getting Started](https://ioquatix.github.io/teapot/guides/getting-started/index) - This guide explains how to use `teapot` to manage cross-platform project dependencies and build systems.
23
+
24
+ ## Releases
25
+
26
+ Please see the [project releases](https://ioquatix.github.io/teapot/releases/index) for all releases.
27
+
28
+ ### v3.6.0
29
+
30
+ - Update dependencies.
31
+
32
+ ## Contributing
33
+
34
+ We welcome contributions to this project.
35
+
36
+ 1. Fork it.
37
+ 2. Create your feature branch (`git checkout -b my-new-feature`).
38
+ 3. Commit your changes (`git commit -am 'Add some feature'`).
39
+ 4. Push to the branch (`git push origin my-new-feature`).
40
+ 5. Create new Pull Request.
41
+
42
+ ### Running Tests
43
+
44
+ To run the test suite:
45
+
46
+ ``` shell
47
+ bundle exec sus
48
+ ```
49
+
50
+ ### Making Releases
51
+
52
+ To make a new release:
53
+
54
+ ``` shell
55
+ bundle exec bake gem:release:patch # or minor or major
56
+ ```
57
+
58
+ ### Developer Certificate of Origin
59
+
60
+ In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
61
+
62
+ ### Community Guidelines
63
+
64
+ This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
data/releases.md ADDED
@@ -0,0 +1,5 @@
1
+ # Releases
2
+
3
+ ## v3.6.0
4
+
5
+ - Update dependencies.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teapot
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.4
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain:
11
10
  - |
@@ -37,7 +36,7 @@ cert_chain:
37
36
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
38
37
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
39
38
  -----END CERTIFICATE-----
40
- date: 2023-04-23 00:00:00.000000000 Z
39
+ date: 1980-01-02 00:00:00.000000000 Z
41
40
  dependencies:
42
41
  - !ruby/object:Gem::Dependency
43
42
  name: build
@@ -101,14 +100,14 @@ dependencies:
101
100
  requirements:
102
101
  - - "~>"
103
102
  - !ruby/object:Gem::Version
104
- version: 0.2.0
103
+ version: '0.4'
105
104
  type: :runtime
106
105
  prerelease: false
107
106
  version_requirements: !ruby/object:Gem::Requirement
108
107
  requirements:
109
108
  - - "~>"
110
109
  - !ruby/object:Gem::Version
111
- version: 0.2.0
110
+ version: '0.4'
112
111
  - !ruby/object:Gem::Dependency
113
112
  name: build-text
114
113
  requirement: !ruby/object:Gem::Requirement
@@ -152,33 +151,33 @@ dependencies:
152
151
  - !ruby/object:Gem::Version
153
152
  version: '1.0'
154
153
  - !ruby/object:Gem::Dependency
155
- name: graphviz
154
+ name: process-group
156
155
  requirement: !ruby/object:Gem::Requirement
157
156
  requirements:
158
157
  - - "~>"
159
158
  - !ruby/object:Gem::Version
160
- version: '1.0'
159
+ version: '1.2'
161
160
  type: :runtime
162
161
  prerelease: false
163
162
  version_requirements: !ruby/object:Gem::Requirement
164
163
  requirements:
165
164
  - - "~>"
166
165
  - !ruby/object:Gem::Version
167
- version: '1.0'
166
+ version: '1.2'
168
167
  - !ruby/object:Gem::Dependency
169
- name: process-group
168
+ name: pstore
170
169
  requirement: !ruby/object:Gem::Requirement
171
170
  requirements:
172
- - - "~>"
171
+ - - ">="
173
172
  - !ruby/object:Gem::Version
174
- version: '1.2'
173
+ version: '0'
175
174
  type: :runtime
176
175
  prerelease: false
177
176
  version_requirements: !ruby/object:Gem::Requirement
178
177
  requirements:
179
- - - "~>"
178
+ - - ">="
180
179
  - !ruby/object:Gem::Version
181
- version: '1.2'
180
+ version: '0'
182
181
  - !ruby/object:Gem::Dependency
183
182
  name: rugged
184
183
  requirement: !ruby/object:Gem::Requirement
@@ -207,70 +206,14 @@ dependencies:
207
206
  - - "~>"
208
207
  - !ruby/object:Gem::Version
209
208
  version: '2.0'
210
- - !ruby/object:Gem::Dependency
211
- name: bundler
212
- requirement: !ruby/object:Gem::Requirement
213
- requirements:
214
- - - ">="
215
- - !ruby/object:Gem::Version
216
- version: '0'
217
- type: :development
218
- prerelease: false
219
- version_requirements: !ruby/object:Gem::Requirement
220
- requirements:
221
- - - ">="
222
- - !ruby/object:Gem::Version
223
- version: '0'
224
- - !ruby/object:Gem::Dependency
225
- name: covered
226
- requirement: !ruby/object:Gem::Requirement
227
- requirements:
228
- - - ">="
229
- - !ruby/object:Gem::Version
230
- version: '0'
231
- type: :development
232
- prerelease: false
233
- version_requirements: !ruby/object:Gem::Requirement
234
- requirements:
235
- - - ">="
236
- - !ruby/object:Gem::Version
237
- version: '0'
238
- - !ruby/object:Gem::Dependency
239
- name: rake
240
- requirement: !ruby/object:Gem::Requirement
241
- requirements:
242
- - - ">="
243
- - !ruby/object:Gem::Version
244
- version: '0'
245
- type: :development
246
- prerelease: false
247
- version_requirements: !ruby/object:Gem::Requirement
248
- requirements:
249
- - - ">="
250
- - !ruby/object:Gem::Version
251
- version: '0'
252
- - !ruby/object:Gem::Dependency
253
- name: rspec
254
- requirement: !ruby/object:Gem::Requirement
255
- requirements:
256
- - - "~>"
257
- - !ruby/object:Gem::Version
258
- version: '3.6'
259
- type: :development
260
- prerelease: false
261
- version_requirements: !ruby/object:Gem::Requirement
262
- requirements:
263
- - - "~>"
264
- - !ruby/object:Gem::Version
265
- version: '3.6'
266
- description:
267
- email:
268
209
  executables:
269
210
  - teapot
270
211
  extensions: []
271
212
  extra_rdoc_files: []
272
213
  files:
273
214
  - bin/teapot
215
+ - context/getting-started.md
216
+ - context/index.yaml
274
217
  - lib/teapot.rb
275
218
  - lib/teapot/command.rb
276
219
  - lib/teapot/command/build.rb
@@ -291,11 +234,16 @@ files:
291
234
  - lib/teapot/select.rb
292
235
  - lib/teapot/target.rb
293
236
  - lib/teapot/version.rb
294
- homepage: http://www.teapot.nz
237
+ - license.md
238
+ - notes.md
239
+ - readme.md
240
+ - releases.md
295
241
  licenses:
296
242
  - MIT
297
- metadata: {}
298
- post_install_message:
243
+ metadata:
244
+ documentation_uri: https://ioquatix.github.io/teapot/
245
+ funding_uri: https://github.com/sponsors/ioquatix
246
+ source_code_uri: https://github.com/ioquatix/teapot
299
247
  rdoc_options: []
300
248
  require_paths:
301
249
  - lib
@@ -303,15 +251,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
303
251
  requirements:
304
252
  - - ">="
305
253
  - !ruby/object:Gem::Version
306
- version: 2.1.0
254
+ version: '3.3'
307
255
  required_rubygems_version: !ruby/object:Gem::Requirement
308
256
  requirements:
309
257
  - - ">="
310
258
  - !ruby/object:Gem::Version
311
259
  version: '0'
312
260
  requirements: []
313
- rubygems_version: 3.4.10
314
- signing_key:
261
+ rubygems_version: 4.0.6
315
262
  specification_version: 4
316
- summary: Teapot is a tool for managing complex cross-platform builds.
263
+ summary: Teapot is a tool for managing cross-platform builds.
317
264
  test_files: []
metadata.gz.sig CHANGED
Binary file