benchset 0.0.4__tar.gz → 0.0.5__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.
- {benchset-0.0.4 → benchset-0.0.5}/Cargo.lock +1 -1
- {benchset-0.0.4 → benchset-0.0.5}/Cargo.toml +1 -1
- {benchset-0.0.4 → benchset-0.0.5}/PKG-INFO +6 -4
- {benchset-0.0.4 → benchset-0.0.5}/Package.swift +2 -2
- {benchset-0.0.4 → benchset-0.0.5}/README.md +5 -3
- {benchset-0.0.4 → benchset-0.0.5}/benchset.egg-info/PKG-INFO +6 -4
- {benchset-0.0.4 → benchset-0.0.5}/pyproject.toml +1 -1
- {benchset-0.0.4 → benchset-0.0.5}/scripts/package_native.py +6 -1
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_reference_artifacts.py +16 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_reference_native.py +6 -2
- {benchset-0.0.4 → benchset-0.0.5}/LICENSE +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/MANIFEST.in +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/Sources/Benchset/Benchset.swift +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset/__init__.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset/__main__.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset/_native.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset/api.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset/cli.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset/models.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset/py.typed +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset/reference.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset.egg-info/SOURCES.txt +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset.egg-info/dependency_links.txt +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset.egg-info/entry_points.txt +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset.egg-info/requires.txt +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/benchset.egg-info/top_level.txt +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/examples/native/c.c +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/examples/native/rust.rs +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/examples/native/swift.swift +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/include/benchset.h +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/include/module.modulemap +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/native/reference-calibration.json +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/native/src/ffi.rs +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/native/src/ffi_reference_tests.rs +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/native/src/ffi_tests.rs +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/native/src/kernel.rs +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/native/src/kernel_tests.rs +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/native/src/lib.rs +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/native/src/reference.rs +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/native/src/reference_tests.rs +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/native/src/runtime_tests.rs +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/rust-toolchain.toml +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/scripts/__init__.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/scripts/build_backend.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/scripts/build_native.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/scripts/check_native_coverage.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/scripts/check_source_install.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/scripts/release.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/scripts/version.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/setup.cfg +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/setup.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/__init__.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/helpers.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/swift/BenchsetTests.swift +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/swift/ReferenceTests.swift +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_benchset.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_build.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_cli.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_errors.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_reference.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_release.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_resources.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_semantics.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_signals.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/test_version.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/typing/__init__.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/typing/reference_negative.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/typing/reference_positive.py +0 -0
- {benchset-0.0.4 → benchset-0.0.5}/tests/typing/test_reference_types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: benchset
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.5
|
|
4
4
|
Summary: Sustained scalar CPU benchmarks with an embeddable Rust core
|
|
5
5
|
Author-email: Evgeniy Blinov <zheni-b@yandex.ru>
|
|
6
6
|
Project-URL: Source, https://github.com/mutating/benchset
|
|
@@ -356,7 +356,7 @@ settings are comparable.
|
|
|
356
356
|
|
|
357
357
|
```toml
|
|
358
358
|
[dependencies]
|
|
359
|
-
benchset = "0.0.
|
|
359
|
+
benchset = "0.0.5"
|
|
360
360
|
# For changes from a local source checkout, use:
|
|
361
361
|
# benchset = { path = "../benchset" }
|
|
362
362
|
```
|
|
@@ -458,7 +458,9 @@ also be required. Obtain their list with
|
|
|
458
458
|
`cargo rustc --release -- --print=native-static-libs`. Dynamic consumers must
|
|
459
459
|
ship the matching platform library with their application. Source consumers
|
|
460
460
|
control their compiler/toolchain settings; use our release artifacts for a
|
|
461
|
-
consistent build policy.
|
|
461
|
+
consistent build policy. The macOS dynamic library uses the install name
|
|
462
|
+
`@rpath/libbenchset.dylib`; add its directory to your application's runtime
|
|
463
|
+
search path (for example, `-Wl,-rpath,/path/to/benchset/lib` when linking).
|
|
462
464
|
|
|
463
465
|
## Embed in Swift on macOS
|
|
464
466
|
|
|
@@ -471,7 +473,7 @@ the same repository. Rust is not required by the consumer.
|
|
|
471
473
|
For a Swift manifest, add:
|
|
472
474
|
|
|
473
475
|
```swift
|
|
474
|
-
.package(url: "https://github.com/mutating/benchset.git", .exact("0.0.
|
|
476
|
+
.package(url: "https://github.com/mutating/benchset.git", .exact("0.0.5"))
|
|
475
477
|
```
|
|
476
478
|
|
|
477
479
|
Add `.product(name: "Benchset", package: "benchset")` to your target's
|
|
@@ -9,8 +9,8 @@ let package = Package(
|
|
|
9
9
|
products: [.library(name: "Benchset", targets: ["Benchset"])],
|
|
10
10
|
targets: [
|
|
11
11
|
.binaryTarget(name: "CBenchset",
|
|
12
|
-
url: "https://github.com/mutating/benchset/releases/download/v0.0.
|
|
13
|
-
checksum: "
|
|
12
|
+
url: "https://github.com/mutating/benchset/releases/download/v0.0.5/Benchset.xcframework.zip",
|
|
13
|
+
checksum: "6e52d62ca06524cf34f7bef608662c4f9dad924a8912962fe97a1ac66004d33a"),
|
|
14
14
|
.target(name: "Benchset", dependencies: ["CBenchset"]),
|
|
15
15
|
.testTarget(name: "BenchsetTests", dependencies: ["Benchset"], path: "tests/swift")
|
|
16
16
|
]
|
|
@@ -322,7 +322,7 @@ settings are comparable.
|
|
|
322
322
|
|
|
323
323
|
```toml
|
|
324
324
|
[dependencies]
|
|
325
|
-
benchset = "0.0.
|
|
325
|
+
benchset = "0.0.5"
|
|
326
326
|
# For changes from a local source checkout, use:
|
|
327
327
|
# benchset = { path = "../benchset" }
|
|
328
328
|
```
|
|
@@ -424,7 +424,9 @@ also be required. Obtain their list with
|
|
|
424
424
|
`cargo rustc --release -- --print=native-static-libs`. Dynamic consumers must
|
|
425
425
|
ship the matching platform library with their application. Source consumers
|
|
426
426
|
control their compiler/toolchain settings; use our release artifacts for a
|
|
427
|
-
consistent build policy.
|
|
427
|
+
consistent build policy. The macOS dynamic library uses the install name
|
|
428
|
+
`@rpath/libbenchset.dylib`; add its directory to your application's runtime
|
|
429
|
+
search path (for example, `-Wl,-rpath,/path/to/benchset/lib` when linking).
|
|
428
430
|
|
|
429
431
|
## Embed in Swift on macOS
|
|
430
432
|
|
|
@@ -437,7 +439,7 @@ the same repository. Rust is not required by the consumer.
|
|
|
437
439
|
For a Swift manifest, add:
|
|
438
440
|
|
|
439
441
|
```swift
|
|
440
|
-
.package(url: "https://github.com/mutating/benchset.git", .exact("0.0.
|
|
442
|
+
.package(url: "https://github.com/mutating/benchset.git", .exact("0.0.5"))
|
|
441
443
|
```
|
|
442
444
|
|
|
443
445
|
Add `.product(name: "Benchset", package: "benchset")` to your target's
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: benchset
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.5
|
|
4
4
|
Summary: Sustained scalar CPU benchmarks with an embeddable Rust core
|
|
5
5
|
Author-email: Evgeniy Blinov <zheni-b@yandex.ru>
|
|
6
6
|
Project-URL: Source, https://github.com/mutating/benchset
|
|
@@ -356,7 +356,7 @@ settings are comparable.
|
|
|
356
356
|
|
|
357
357
|
```toml
|
|
358
358
|
[dependencies]
|
|
359
|
-
benchset = "0.0.
|
|
359
|
+
benchset = "0.0.5"
|
|
360
360
|
# For changes from a local source checkout, use:
|
|
361
361
|
# benchset = { path = "../benchset" }
|
|
362
362
|
```
|
|
@@ -458,7 +458,9 @@ also be required. Obtain their list with
|
|
|
458
458
|
`cargo rustc --release -- --print=native-static-libs`. Dynamic consumers must
|
|
459
459
|
ship the matching platform library with their application. Source consumers
|
|
460
460
|
control their compiler/toolchain settings; use our release artifacts for a
|
|
461
|
-
consistent build policy.
|
|
461
|
+
consistent build policy. The macOS dynamic library uses the install name
|
|
462
|
+
`@rpath/libbenchset.dylib`; add its directory to your application's runtime
|
|
463
|
+
search path (for example, `-Wl,-rpath,/path/to/benchset/lib` when linking).
|
|
462
464
|
|
|
463
465
|
## Embed in Swift on macOS
|
|
464
466
|
|
|
@@ -471,7 +473,7 @@ the same repository. Rust is not required by the consumer.
|
|
|
471
473
|
For a Swift manifest, add:
|
|
472
474
|
|
|
473
475
|
```swift
|
|
474
|
-
.package(url: "https://github.com/mutating/benchset.git", .exact("0.0.
|
|
476
|
+
.package(url: "https://github.com/mutating/benchset.git", .exact("0.0.5"))
|
|
475
477
|
```
|
|
476
478
|
|
|
477
479
|
Add `.product(name: "Benchset", package: "benchset")` to your target's
|
|
@@ -40,7 +40,12 @@ def main():
|
|
|
40
40
|
for filename in ('libbenchset.a', 'benchset.lib', 'libbenchset.dylib', 'libbenchset.so',
|
|
41
41
|
'benchset.dll', 'benchset.dll.lib'):
|
|
42
42
|
if (source / filename).exists():
|
|
43
|
-
|
|
43
|
+
destination = staging / 'lib' / filename
|
|
44
|
+
shutil.copy2(source / filename, destination)
|
|
45
|
+
if filename.endswith('.dylib'):
|
|
46
|
+
subprocess.run(['install_name_tool', '-id', '@rpath/' + filename, str(destination)], check=True)
|
|
47
|
+
# Ship a valid ad-hoc signature for both Apple architectures.
|
|
48
|
+
subprocess.run(['codesign', '--force', '--sign', '-', str(destination)], check=True)
|
|
44
49
|
shutil.copytree(ROOT / 'include', staging / 'include', dirs_exist_ok=True)
|
|
45
50
|
for filename in ('README.md', 'LICENSE'):
|
|
46
51
|
shutil.copy2(ROOT / filename, staging / filename)
|
|
@@ -590,6 +590,22 @@ def native_bundle(source_snapshot: Path, rust_tools: Tuple[Dict[str, str], str,
|
|
|
590
590
|
return directory
|
|
591
591
|
|
|
592
592
|
|
|
593
|
+
@pytest.mark.skipif(sys.platform != 'darwin', reason='Mach-O install names and code signing')
|
|
594
|
+
@pytest.mark.parametrize('target', ['aarch64-apple-darwin', 'x86_64-apple-darwin'])
|
|
595
|
+
def test_macos_native_zip_has_relocatable_install_name_and_valid_signature(
|
|
596
|
+
source_snapshot: Path, rust_tools: Tuple[Dict[str, str], str, str], tmp_path: Path, target: str,
|
|
597
|
+
) -> None:
|
|
598
|
+
environment, _cargo, _host = rust_tools
|
|
599
|
+
execute([sys.executable, 'scripts/package_native.py', '--target', target], source_snapshot, environment)
|
|
600
|
+
archive = source_snapshot / 'release-artifacts' / ('benchset-' + target + '.zip')
|
|
601
|
+
with zipfile.ZipFile(archive) as package:
|
|
602
|
+
package.extractall(tmp_path)
|
|
603
|
+
library = tmp_path / 'lib/libbenchset.dylib'
|
|
604
|
+
identity = execute(['otool', '-D', str(library)], tmp_path, dict(os.environ))
|
|
605
|
+
assert identity.splitlines()[1:] == ['@rpath/libbenchset.dylib']
|
|
606
|
+
execute(['codesign', '--verify', '--strict', str(library)], tmp_path, dict(os.environ))
|
|
607
|
+
|
|
608
|
+
|
|
593
609
|
def test_unpacked_native_zip_links_its_public_header_and_library(
|
|
594
610
|
native_bundle: Path, tmp_path: Path,
|
|
595
611
|
) -> None:
|
|
@@ -57,8 +57,12 @@ def compile_and_run_consumer( # noqa: PLR0913 - explicit build inputs and execu
|
|
|
57
57
|
compiled = subprocess.run(command, cwd=working_dir, capture_output=True, text=True, check=False)
|
|
58
58
|
assert compiled.returncode == 0, compiled.stdout + compiled.stderr
|
|
59
59
|
environment = os.environ.copy()
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
# Unix consumers use the linked runtime search path. Loader environment
|
|
61
|
+
# overrides would hide a library's embedded build-machine install name.
|
|
62
|
+
for variable in ('DYLD_LIBRARY_PATH', 'LD_LIBRARY_PATH'):
|
|
63
|
+
environment.pop(variable, None)
|
|
64
|
+
if os.name == 'nt':
|
|
65
|
+
environment['PATH'] = str(library.parent) + os.pathsep + environment.get('PATH', '')
|
|
62
66
|
result = subprocess.run([str(executable)], cwd=working_dir, env=environment,
|
|
63
67
|
capture_output=True, text=True, timeout=30, check=False)
|
|
64
68
|
if (allow_no_work and result.returncode == 1 and 'Reference:' in result.stdout
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|