python-nss-ng 1.0.5__tar.gz → 1.1.0__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 (129) hide show
  1. python_nss_ng-1.1.0/.git_archival.txt +4 -0
  2. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/CONTRIBUTING.md +2 -2
  3. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/PKG-INFO +7 -7
  4. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/QUICKSTART.md +3 -3
  5. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/README.md +4 -4
  6. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/REUSE.toml +1 -0
  7. python_nss_ng-1.1.0/_version.txt +1 -0
  8. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/meson.build +14 -1
  9. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/pyproject.toml +2 -2
  10. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/pyproject.toml +5 -3
  11. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/pyrightconfig.json +6 -1
  12. python_nss_ng-1.1.0/scripts/meson-version.py +164 -0
  13. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/__init__.py +9 -1
  14. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/uv.lock +185 -147
  15. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/.clangd +0 -0
  16. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/LICENSE +0 -0
  17. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/LICENSE.gpl +0 -0
  18. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/LICENSE.lgpl +0 -0
  19. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/LICENSE.mpl +0 -0
  20. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/LICENSES/Apache-2.0.txt +0 -0
  21. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/LICENSES/MPL-2.0.txt +0 -0
  22. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/MANIFEST.in +0 -0
  23. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/Makefile +0 -0
  24. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/ChangeLog +0 -0
  25. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/MAKEFILE_MIGRATION.md +0 -0
  26. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/MANYLINUX_CONFIG.md +0 -0
  27. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/MIGRATION.md +0 -0
  28. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/MUTATION_TESTING.md +0 -0
  29. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/TESTING.md +0 -0
  30. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/examples/cert_dump.py +0 -0
  31. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/examples/cert_trust.py +0 -0
  32. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/examples/httplib_example.py +0 -0
  33. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/examples/pbkdf2_example.py +0 -0
  34. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/examples/ssl_cipher_info.py +0 -0
  35. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/examples/ssl_example.py +0 -0
  36. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/examples/ssl_version_range.py +0 -0
  37. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/examples/verify_cert.py +0 -0
  38. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/examples/verify_server.py +0 -0
  39. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/doc/get_api +0 -0
  40. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/src/deprecations.py +0 -0
  41. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/src/deprecations.py.meta +0 -0
  42. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/src/nss_context.py +0 -0
  43. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/src/nss_context.py.meta +0 -0
  44. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/src/secure_logging.py +0 -0
  45. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/src/secure_logging.py.meta +0 -0
  46. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/conftest.py +0 -0
  47. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/exceptions.py +0 -0
  48. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/run_tests +0 -0
  49. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/setup_certs.py +0 -0
  50. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_cert_components.py +0 -0
  51. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_cert_request.py +0 -0
  52. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_certificate_advanced.py +0 -0
  53. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_cipher.py +0 -0
  54. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_client_server.py +0 -0
  55. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_deprecations.py +0 -0
  56. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_digest.py +0 -0
  57. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_documentation_accuracy.py +0 -0
  58. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_error_messages.py +0 -0
  59. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_examples.py +0 -0
  60. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_integration.py +0 -0
  61. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_misc.py +0 -0
  62. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_nss_context.py +0 -0
  63. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_ocsp.py +0 -0
  64. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_performance.py +0 -0
  65. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_pkcs12.py +0 -0
  66. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_platform_specific.py +0 -0
  67. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_property_based.py +0 -0
  68. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_secure_logging.py +0 -0
  69. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_security.py +0 -0
  70. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_thread_safety.py +0 -0
  71. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_type_hints.py +0 -0
  72. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/test_util.py +0 -0
  73. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/mutants/test/util.py +0 -0
  74. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/scripts/README.md +0 -0
  75. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/scripts/run-all-tests.sh +0 -0
  76. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/NSPRerrs.h +0 -0
  77. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/SECerrs.h +0 -0
  78. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/SSLerrs.h +0 -0
  79. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/deprecations.py +0 -0
  80. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/io.pyi +0 -0
  81. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/nss.pyi +0 -0
  82. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/nss_context.py +0 -0
  83. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/py_nspr_common.h +0 -0
  84. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/py_nspr_error.c +0 -0
  85. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/py_nspr_error.h +0 -0
  86. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/py_nspr_io.c +0 -0
  87. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/py_nspr_io.h +0 -0
  88. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/py_nss.c +0 -0
  89. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/py_nss.h +0 -0
  90. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/py_shared_doc.h +0 -0
  91. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/py_ssl.c +0 -0
  92. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/py_ssl.h +0 -0
  93. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/py_traceback.h +0 -0
  94. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/secure_logging.py +0 -0
  95. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/src/ssl.pyi +0 -0
  96. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/conftest.py +0 -0
  97. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/exceptions.py +0 -0
  98. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/run_tests +0 -0
  99. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/setup_certs.py +0 -0
  100. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_cert_components.py +0 -0
  101. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_cert_request.py +0 -0
  102. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_certificate_advanced.py +0 -0
  103. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_cipher.py +0 -0
  104. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_client_server.py +0 -0
  105. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_deprecations.py +0 -0
  106. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_digest.py +0 -0
  107. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_documentation_accuracy.py +0 -0
  108. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_examples.py +0 -0
  109. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_misc.py +0 -0
  110. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_performance.py +0 -0
  111. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_pkcs12.py +0 -0
  112. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_platform_specific.py +0 -0
  113. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_property_based.py +0 -0
  114. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_secure_logging.py +0 -0
  115. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_security.py +0 -0
  116. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_thread_safety.py +0 -0
  117. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_type_hints.py +0 -0
  118. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_util.py +0 -0
  119. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_zzz_error_messages.py +0 -0
  120. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_zzz_integration.py +0 -0
  121. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_zzz_nonexistent_certs.py +0 -0
  122. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_zzz_nss_context.py +0 -0
  123. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/test_zzz_ocsp.py +0 -0
  124. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/test/util.py +0 -0
  125. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/typings/nss/__init__.pyi +0 -0
  126. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/typings/nss/error.pyi +0 -0
  127. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/typings/nss/io.pyi +0 -0
  128. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/typings/nss/nss.pyi +0 -0
  129. {python_nss_ng-1.0.5 → python_nss_ng-1.1.0}/typings/nss/ssl.pyi +0 -0
@@ -0,0 +1,4 @@
1
+ node: ceb747232755bf570e5ceacb4e3a82f5d31ca085
2
+ node-date: 2026-06-09T07:15:24-06:00
3
+ describe-name: v1.1.0
4
+ ref-names: grafted, HEAD, tag: v1.1.0, origin/main, origin/HEAD
@@ -51,7 +51,7 @@ See [QUICKSTART.md](QUICKSTART.md) for detailed setup instructions.
51
51
 
52
52
  ```bash
53
53
  # Clone the repository
54
- git clone https://github.com/ModeSevenIndustrialSolutions/python-nss-ng.git
54
+ git clone https://github.com/lfreleng-actions/python-nss-ng.git
55
55
  cd python-nss-ng
56
56
 
57
57
  # Install system dependencies (Ubuntu/Debian)
@@ -342,7 +342,7 @@ Releases are handled automatically via `build-test-release.yaml`:
342
342
 
343
343
  ## Getting Help
344
344
 
345
- - **Issues:** [GitHub Issues](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/issues)
345
+ - **Issues:** [GitHub Issues](https://github.com/lfreleng-actions/python-nss-ng/issues)
346
346
  - **Discussions:** Use GitHub Discussions for questions
347
347
  - **Email:** Maintainers listed in `pyproject.toml`
348
348
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-nss-ng
3
- Version: 1.0.5
3
+ Version: 1.1.0
4
4
  Summary: Python bindings for Network Security Services (NSS) and Netscape Portable Runtime (NSPR)
5
5
  Keywords: nss,nspr,cryptography,ssl,tls,pki,x509,security
6
6
  Author-Email: John Dennis <jdennis@redhat.com>, Matthew Watkins <mwatkins@linuxfoundation.org>
@@ -26,8 +26,8 @@ Classifier: Topic :: Security :: Cryptography
26
26
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
27
  Project-URL: Homepage, http://www.mozilla.org/projects/security/pki/python-nss-ng
28
28
  Project-URL: Documentation, http://www.mozilla.org/projects/security/pki/python-nss-ng
29
- Project-URL: Repository, https://github.com/ModeSevenIndustrialSolutions/python-nss-ng
30
- Project-URL: Issues, https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/issues
29
+ Project-URL: Repository, https://github.com/lfreleng-actions/python-nss-ng
30
+ Project-URL: Issues, https://github.com/lfreleng-actions/python-nss-ng/issues
31
31
  Requires-Python: >=3.10
32
32
  Provides-Extra: test
33
33
  Requires-Dist: pytest>=9.0.2; extra == "test"
@@ -62,8 +62,8 @@ SPDX-FileCopyrightText: 2025 The Linux Foundation
62
62
 
63
63
  # python-nss-ng
64
64
 
65
- [![Platform Compatibility](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/actions/workflows/compatibility.yaml/badge.svg)](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/actions/workflows/compatibility.yaml)
66
- [![CI/CD Pipeline](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/actions/workflows/build-test.yaml/badge.svg)](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/actions/workflows/build-test.yaml)
65
+ [![Platform Compatibility](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/compatibility.yaml/badge.svg)](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/compatibility.yaml)
66
+ [![CI/CD Pipeline](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/build-test.yaml/badge.svg)](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/build-test.yaml)
67
67
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
68
68
  [![License: MPL-2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)
69
69
 
@@ -354,5 +354,5 @@ the NSS compatibility issues and modernize the C code are welcome!
354
354
 
355
355
  ## Support
356
356
 
357
- - **Issues**: [GitHub Issues](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/issues)
358
- - **Repository**: [GitHub Repository](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng)
357
+ - **Issues**: [GitHub Issues](https://github.com/lfreleng-actions/python-nss-ng/issues)
358
+ - **Repository**: [GitHub Repository](https://github.com/lfreleng-actions/python-nss-ng)
@@ -46,7 +46,7 @@ brew install nss nspr pkg-config
46
46
  curl -LsSf https://astral.sh/uv/install.sh | sh
47
47
 
48
48
  # Clone the repository
49
- git clone https://github.com/ModeSevenIndustrialSolutions/python-nss-ng.git
49
+ git clone https://github.com/lfreleng-actions/python-nss-ng.git
50
50
  cd python-nss-ng
51
51
 
52
52
  # Create virtual environment and install dependencies
@@ -63,7 +63,7 @@ uv pip install -e ".[dev]"
63
63
 
64
64
  ```bash
65
65
  # Clone the repository
66
- git clone https://github.com/ModeSevenIndustrialSolutions/python-nss-ng.git
66
+ git clone https://github.com/lfreleng-actions/python-nss-ng.git
67
67
  cd python-nss-ng
68
68
 
69
69
  # Create virtual environment
@@ -230,7 +230,7 @@ python-nss-ng/
230
230
  ## Getting Help
231
231
 
232
232
  - **Documentation**: Check README.md and doc/ directory
233
- - **Issues**: <https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/issues>
233
+ - **Issues**: <https://github.com/lfreleng-actions/python-nss-ng/issues>
234
234
  - **TODO List**: See TODO.md for current tasks
235
235
  - **Contributing**: See CONTRIBUTING.md for guidelines
236
236
 
@@ -5,8 +5,8 @@ SPDX-FileCopyrightText: 2025 The Linux Foundation
5
5
 
6
6
  # python-nss-ng
7
7
 
8
- [![Platform Compatibility](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/actions/workflows/compatibility.yaml/badge.svg)](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/actions/workflows/compatibility.yaml)
9
- [![CI/CD Pipeline](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/actions/workflows/build-test.yaml/badge.svg)](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/actions/workflows/build-test.yaml)
8
+ [![Platform Compatibility](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/compatibility.yaml/badge.svg)](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/compatibility.yaml)
9
+ [![CI/CD Pipeline](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/build-test.yaml/badge.svg)](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/build-test.yaml)
10
10
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
11
11
  [![License: MPL-2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)
12
12
 
@@ -297,5 +297,5 @@ the NSS compatibility issues and modernize the C code are welcome!
297
297
 
298
298
  ## Support
299
299
 
300
- - **Issues**: [GitHub Issues](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/issues)
301
- - **Repository**: [GitHub Repository](https://github.com/ModeSevenIndustrialSolutions/python-nss-ng)
300
+ - **Issues**: [GitHub Issues](https://github.com/lfreleng-actions/python-nss-ng/issues)
301
+ - **Repository**: [GitHub Repository](https://github.com/lfreleng-actions/python-nss-ng)
@@ -22,6 +22,7 @@ SPDX-FileCopyrightText = "2025 The Linux Foundation"
22
22
  [[annotations]]
23
23
  path = [
24
24
  "pyrightconfig.json",
25
+ ".git_archival.txt",
25
26
  "scripts/README.md",
26
27
  "doc/ChangeLog",
27
28
  ]
@@ -0,0 +1 @@
1
+ 1.1.0
@@ -4,7 +4,14 @@
4
4
  project(
5
5
  'python-nss-ng',
6
6
  'c',
7
- version: '0.1.0',
7
+ # Dynamic versioning: the version is derived from the most recent
8
+ # `v*` git tag (or, for builds from an sdist, the baked-in
9
+ # `_version.txt`). See scripts/meson-version.py for the resolution
10
+ # logic and `meson.add_dist_script` below for the sdist fallback.
11
+ version: run_command(
12
+ 'scripts/meson-version.py',
13
+ check: true,
14
+ ).stdout().strip(),
8
15
  license: 'MPL-2.0 OR GPL-2.0-or-later OR LGPL-2.0-or-later',
9
16
  default_options: [
10
17
  'warning_level=2',
@@ -13,6 +20,12 @@ project(
13
20
  meson_version: '>=1.2.0',
14
21
  )
15
22
 
23
+ # Bake the resolved version into the source distribution so that wheels
24
+ # built from the sdist (which has no `.git`) can recover the correct
25
+ # version. The script writes `$MESON_DIST_ROOT/_version.txt`, which
26
+ # scripts/meson-version.py reads back as its fallback.
27
+ meson.add_dist_script('scripts/meson-version.py', '--bake-dist')
28
+
16
29
  # Import Python module
17
30
  py = import('python').find_installation(pure: false)
18
31
 
@@ -85,8 +85,8 @@ dev = [
85
85
  [project.urls]
86
86
  Homepage = "http://www.mozilla.org/projects/security/pki/python-nss-ng"
87
87
  Documentation = "http://www.mozilla.org/projects/security/pki/python-nss-ng"
88
- Repository = "https://github.com/ModeSevenIndustrialSolutions/python-nss-ng"
89
- Issues = "https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/issues"
88
+ Repository = "https://github.com/lfreleng-actions/python-nss-ng"
89
+ Issues = "https://github.com/lfreleng-actions/python-nss-ng/issues"
90
90
 
91
91
  [tool.meson-python.args]
92
92
  # Meson build arguments can be specified here if needed
@@ -11,7 +11,7 @@ build-backend = "mesonpy"
11
11
 
12
12
  [project]
13
13
  name = "python-nss-ng"
14
- version = "1.0.5"
14
+ dynamic = ["version"]
15
15
  description = "Python bindings for Network Security Services (NSS) and Netscape Portable Runtime (NSPR)"
16
16
  readme = "README.md"
17
17
  license = "MPL-2.0 OR GPL-2.0-or-later OR LGPL-2.0-or-later"
@@ -85,8 +85,8 @@ dev = [
85
85
  [project.urls]
86
86
  Homepage = "http://www.mozilla.org/projects/security/pki/python-nss-ng"
87
87
  Documentation = "http://www.mozilla.org/projects/security/pki/python-nss-ng"
88
- Repository = "https://github.com/ModeSevenIndustrialSolutions/python-nss-ng"
89
- Issues = "https://github.com/ModeSevenIndustrialSolutions/python-nss-ng/issues"
88
+ Repository = "https://github.com/lfreleng-actions/python-nss-ng"
89
+ Issues = "https://github.com/lfreleng-actions/python-nss-ng/issues"
90
90
 
91
91
  [tool.meson-python.args]
92
92
  # Meson build arguments can be specified here if needed
@@ -248,6 +248,8 @@ ignore = [
248
248
  "UP032", # use f-string instead of format
249
249
  ]
250
250
  "test/setup_certs.py" = ["S603", "S607"] # Allow subprocess calls in cert setup
251
+ # Build-time version helper that shells out to the trusted `git` binary.
252
+ "scripts/meson-version.py" = ["S603", "S607"]
251
253
 
252
254
  [tool.ruff.lint.isort]
253
255
  known-first-party = ["nss"]
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "include": [
3
3
  "src",
4
- "test"
4
+ "test",
5
+ "scripts"
5
6
  ],
6
7
  "exclude": [
7
8
  "**/node_modules",
@@ -49,6 +50,10 @@
49
50
  "extraPaths": [
50
51
  "src"
51
52
  ]
53
+ },
54
+ {
55
+ "root": "scripts",
56
+ "pythonVersion": "3.10"
52
57
  }
53
58
  ]
54
59
  }
@@ -0,0 +1,164 @@
1
+ #!/usr/bin/env python3
2
+ # SPDX-License-Identifier: MPL-2.0
3
+ # SPDX-FileCopyrightText: 2026 The Linux Foundation
4
+ """Resolve the project version for meson-python dynamic versioning.
5
+
6
+ ``meson-python`` has no native SCM/git versioning: when ``version`` is
7
+ listed in ``[project].dynamic`` it reads the version from the meson
8
+ ``project()`` call. This helper supplies that value, derived from git,
9
+ so the version is driven entirely by the pushed tag.
10
+
11
+ Resolution order:
12
+
13
+ 1. ``$PYTHON_NSS_NG_VERSION`` -- an explicit override for downstream
14
+ packagers building from a context where neither git nor an sdist is
15
+ available (e.g. a manually patched tree).
16
+ 2. ``git describe`` against the surrounding work tree. This covers local
17
+ development and CI wheel/sdist builds, where ``.git`` is present.
18
+ 3. A frozen ``_version.txt`` baked into the sdist at ``meson dist`` time.
19
+ Wheels built from the PyPI source distribution have no ``.git``, so
20
+ the baked file is what lets them resolve the correct version.
21
+ 4. ``.git_archival.txt`` substituted by ``git archive`` (export-subst).
22
+ GitHub's auto-generated source tarballs are ``git archive`` output:
23
+ they have no ``.git`` and no baked ``_version.txt``, but do carry the
24
+ tag via this file, letting distro packagers build the real version.
25
+ 5. As a last resort, in a git work tree with no reachable tag (a shallow
26
+ CI checkout), a non-publishable ``0.0.0+g<sha>`` dev version.
27
+
28
+ Modes:
29
+
30
+ * default -- print the resolved version on stdout for ``run_command()``
31
+ in ``meson.build``.
32
+ * ``--bake-dist`` -- write the resolved version to
33
+ ``$MESON_DIST_ROOT/_version.txt`` during ``meson dist`` so the sdist
34
+ carries a git-independent fallback.
35
+ """
36
+
37
+ from __future__ import annotations
38
+
39
+ import os
40
+ import re
41
+ import subprocess
42
+ import sys
43
+ from pathlib import Path
44
+
45
+ # scripts/meson-version.py -> repository (or unpacked sdist) root
46
+ ROOT = Path(__file__).resolve().parent.parent
47
+ FALLBACK = ROOT / "_version.txt"
48
+ ARCHIVAL = ROOT / ".git_archival.txt"
49
+ ENV_OVERRIDE = "PYTHON_NSS_NG_VERSION"
50
+
51
+
52
+ def _from_env() -> str | None:
53
+ """Return an explicit version override from the environment, if set."""
54
+ return os.environ.get(ENV_OVERRIDE, "").strip() or None
55
+
56
+
57
+ def _from_git_archival() -> str | None:
58
+ """Resolve the version from a ``git archive`` ``.git_archival.txt``.
59
+
60
+ The ``describe-name`` field is substituted by ``git archive`` via the
61
+ ``export-subst`` attribute. In a plain checkout the placeholder is not
62
+ expanded (it still reads ``$Format:...$``), so such values are ignored.
63
+ """
64
+ if not ARCHIVAL.is_file():
65
+ return None
66
+ describe = None
67
+ for line in ARCHIVAL.read_text(encoding="utf-8").splitlines():
68
+ if line.startswith("describe-name:"):
69
+ describe = line.split(":", 1)[1].strip()
70
+ break
71
+ if not describe or describe.startswith("$Format:"):
72
+ return None
73
+ return _to_pep440(describe)
74
+
75
+
76
+ def _run_git(args: list[str]) -> str | None:
77
+ """Run a git command in ROOT, returning stripped stdout or None."""
78
+ try:
79
+ result = subprocess.run(
80
+ ["git", *args],
81
+ cwd=ROOT,
82
+ capture_output=True,
83
+ text=True,
84
+ check=True,
85
+ )
86
+ except (OSError, subprocess.CalledProcessError):
87
+ return None
88
+ return result.stdout.strip() or None
89
+
90
+
91
+ def _git_describes_this_tree() -> bool:
92
+ """True only when ROOT is the top of a real git work tree.
93
+
94
+ Guards against an unpacked sdist that happens to live inside an
95
+ unrelated parent git repository (e.g. a build temp dir), which would
96
+ otherwise yield a bogus version from the wrong project.
97
+ """
98
+ top = _run_git(["rev-parse", "--show-toplevel"])
99
+ return top is not None and Path(top).resolve() == ROOT
100
+
101
+
102
+ def _to_pep440(describe: str) -> str:
103
+ """Convert ``git describe`` output to a PEP 440 version string."""
104
+ # Drop the conventional leading "v" (v1.0.6 -> 1.0.6).
105
+ text = describe.lstrip("vV")
106
+ # Exact tag (no trailing -<distance>-g<sha>): use it verbatim.
107
+ match = re.fullmatch(r"(?P<tag>.+?)-(?P<distance>\d+)-g(?P<sha>[0-9a-f]+)", text)
108
+ if match is None:
109
+ return text
110
+ # Commits after the tag: PEP 440 post-release with a local segment,
111
+ # e.g. 1.0.6.post3+g1a2b3c4. Local-segment versions are intentionally
112
+ # not publishable to PyPI; only exact tags produce clean versions.
113
+ return f"{match.group('tag')}.post{match.group('distance')}+g{match.group('sha')}"
114
+
115
+
116
+ def resolve_version() -> str:
117
+ """Resolve the project version from git or the baked fallback file."""
118
+ env_version = _from_env()
119
+ if env_version:
120
+ return env_version
121
+ in_git_tree = _git_describes_this_tree()
122
+ if in_git_tree:
123
+ describe = _run_git(["describe", "--tags", "--match", "v[0-9]*"])
124
+ if describe:
125
+ return _to_pep440(describe)
126
+ if FALLBACK.is_file():
127
+ return FALLBACK.read_text(encoding="utf-8").strip()
128
+ archival = _from_git_archival()
129
+ if archival:
130
+ return archival
131
+ if in_git_tree:
132
+ # A git work tree with no reachable v* tag -- typically a shallow
133
+ # CI checkout (fetch-depth: 1) that did not fetch tags, as used by
134
+ # the test/audit/SBOM jobs that reinstall from source. Emit a
135
+ # non-publishable dev version built from the short commit SHA so
136
+ # those non-release builds still succeed. The local-version
137
+ # segment ('+g...') is rejected by PyPI, so it can never be
138
+ # mistaken for or published as a real release; release builds
139
+ # check out the tag and take the branch above instead.
140
+ sha = _run_git(["rev-parse", "--short", "HEAD"])
141
+ if sha:
142
+ return f"0.0.0+g{sha}"
143
+ sys.exit(
144
+ f"meson-version: cannot resolve version: set ${ENV_OVERRIDE}, or "
145
+ "build from a git checkout, an sdist, or a git archive"
146
+ )
147
+
148
+
149
+ def main(argv: list[str]) -> int:
150
+ version = resolve_version()
151
+ if "--bake-dist" in argv:
152
+ dist_root = os.environ.get("MESON_DIST_ROOT")
153
+ if not dist_root:
154
+ sys.exit("meson-version: --bake-dist requires MESON_DIST_ROOT")
155
+ target = Path(dist_root) / "_version.txt"
156
+ target.write_text(version + "\n", encoding="utf-8")
157
+ print(f"meson-version: baked {version} into {target}")
158
+ return 0
159
+ print(version)
160
+ return 0
161
+
162
+
163
+ if __name__ == "__main__":
164
+ raise SystemExit(main(sys.argv[1:]))
@@ -5,6 +5,8 @@
5
5
  # SPDX-FileCopyrightText: Copyright (c) 2010-2025 python-nss-ng contributors
6
6
 
7
7
  import sys
8
+ from importlib.metadata import PackageNotFoundError
9
+ from importlib.metadata import version as _pkg_version
8
10
 
9
11
  # Platform support check - only Linux and macOS are supported
10
12
  if sys.platform.startswith("win"):
@@ -312,4 +314,10 @@ To be added
312
314
 
313
315
  """
314
316
 
315
- __version__ = "1.0.1"
317
+ try:
318
+ __version__ = _pkg_version("python-nss-ng")
319
+ except PackageNotFoundError: # pragma: no cover - running from an uninstalled tree
320
+ # Importing from a source checkout that was never installed (e.g.
321
+ # building the docs in-tree). The real version is resolved from the
322
+ # git tag at build time; fall back to a clearly-non-release marker.
323
+ __version__ = "0.0.0+unknown"