Skip to content

Commit 37a3f33

Browse files
authored
Release of version 1.4.1 (#21)
## 1.4.1 (2024-08-27) ### Changed - Migrated from .reuse/dep5 to REUSE.toml ### Fixed - Added optigatrust-libusb-win-amd64 library
1 parent d425bb9 commit 37a3f33

13 files changed

+674
-10
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ dist/
2626
downloads/
2727
eggs/
2828
.eggs/
29-
lib/
3029
lib64/
3130
parts/
3231
sdist/

.gitmodules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
[submodule "extras/optiga-trust-m/external/optiga"]
44
path = extras/optiga-trust-m/external/optiga
55
url = https://github.com/Infineon/optiga-trust-m.git
6+
branch = release-v5.1.0

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 1.4.1 (2024-08-27)
9+
10+
### Changed
11+
- Migrated from .reuse/dep5 to REUSE.toml
12+
13+
### Fixed
14+
- Added optigatrust-libusb-win-amd64 library
15+
16+
817
## 1.4.0 (2024-08-08)
918

1019
### Added

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ python-optiga-trust
7373
| tests | Tests for the Python module optigatrust |
7474

7575
## Licensing
76-
76+
7777
Please see our [LICENSE](LICENSE) for copyright and license information.
78-
79-
This project follows the REUSE approach, so copyright and licensing information is available for every file (including third party components) either in the file header, an individual *.license file or the .reuse/dep5 file. All licenses can be found in the [LICENSES](LICENSES) folder.
78+
79+
This project follows the [REUSE](https://reuse.software/) approach, so copyright and licensing information is
80+
available for every file (including third party components) either in the file header, an individual *.license file or
81+
a REUSE.toml file. All licenses can be found in the [LICENSES](LICENSES) folder.

REUSE.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-FileCopyrightText: 2024 Infineon Technologies AG
2+
# SPDX-License-Identifier: MIT
3+
4+
version = 1
5+
6+
[[annotations]]
7+
path = ["README.md",
8+
"CHANGELOG.md",
9+
"INSTALL.md",
10+
"docs/**",
11+
"src/optigatrust/DESCRIPTION.md",
12+
"tests/README.md",
13+
"extras/optiga-trust-m/README.md"]
14+
precedence = "aggregate"
15+
SPDX-FileCopyrightText = "2021-2024 Infineon Technologies AG"
16+
SPDX-License-Identifier = "CC0-1.0"
17+
18+
[[annotations]]
19+
path = ["src/optigatrust/lib/**",
20+
"tests/fixtures/**.pem",
21+
"tests/fixtures/**.crt",
22+
"tests/fixtures/**.key",
23+
"tests/fixtures/optiga_trust_m_v3_test_configuration.json"]
24+
precedence = "aggregate"
25+
SPDX-FileCopyrightText = "2021-2024 Infineon Technologies AG"
26+
SPDX-License-Identifier = "CC-BY-NC-ND-4.0"

setup.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
from setuptools import setup, find_packages
55
from setuptools.command.install import install
66

7-
import platform
7+
import codecs
88
import sys
99
import os
1010
import shutil
1111

12+
def read(rel_path):
13+
here = os.path.abspath(os.path.dirname(__file__))
14+
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
15+
return fp.read()
1216

1317
def __copy_rules(target):
1418
rules = 'rules/90-optigatrust.rules'
@@ -29,14 +33,20 @@ def _install_rules():
2933
except:
3034
print('Install udev rules failed')
3135

32-
3336
def __description():
3437
description_file = os.path.join("src" , "optigatrust", "DESCRIPTION.md")
3538
with open(description_file, 'r', encoding='utf-8') as f:
3639
readme = f.read()
3740

3841
return readme
3942

43+
def __get_version(rel_path):
44+
for line in read(rel_path).splitlines():
45+
if line.startswith('__version__'):
46+
delim = '"' if '"' in line else "'"
47+
return line.split(delim)[1]
48+
else:
49+
raise RuntimeError("Unable to find version string.")
4050

4151
class OptigaTrustInstall(install):
4252
def run(self):
@@ -94,7 +104,7 @@ def run(self):
94104
if __name__ == '__main__':
95105
setup(
96106
name=__name,
97-
version=__version,
107+
version=__get_version("src/optigatrust/version.py"),
98108
description=__desc,
99109
long_description=__description(),
100110
long_description_content_type='text/markdown',
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/optigatrust/version.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55

66
"""Library version"""
77

8-
__version_info__ = (1, 4, 0)
9-
10-
__version__ = ".".join([str(x) for x in __version_info__])
8+
__version__ = "1.4.1"
9+
__version_info__ = tuple(int(i) for i in __version__.split(".") if i.isdigit())

tests/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,11 @@ Currently, oscrypto has some issues in combination with OpenSSL v3.x.x. There is
4242
python -m pip install git+https://github.com/wbond/oscrypto.git@1547f535001ba568b239b8797465536759c742a3
4343
```
4444
NOTE: This is only needed on Windows systems. On Linux, the official release of oscrypto can be used. It is part of [tests/requirements.txt](requirements.txt)
45+
46+
## Configuring OPTIGA™ Trust M v3 samples for tests
47+
48+
The tests in this folder require a certain configuration of the OPTIGA™ Trust M v3 sample under test. Thus, please prepare your samples (once), to manually set the data and metadata of the OPTIGA™ Trust M v3 sample using the following command in order to ensure the tests run correctly.
49+
50+
```bash
51+
optigatrust object --in ./tests/fixtures/optiga_trust_m_v3_test_configuration.json
52+
```

0 commit comments

Comments
 (0)