]> git.pld-linux.org Git - packages/python3-tpm2-pytss.git/blame - python3-tpm2-pytss.spec
- updated to 2.1.0
[packages/python3-tpm2-pytss.git] / python3-tpm2-pytss.spec
CommitLineData
625810ec
JB
1#
2# Conditional build:
3%bcond_without doc # API documentation
4%bcond_with tests # unit tests (fapi tests fail)
5
6%define module template
7Summary: TPM 2.0 TSS Bindings for Python
8Summary(pl.UTF-8): Wiązania TPM 2.0 TSS dla Pythona
9Name: python3-tpm2-pytss
f8d84ea1 10Version: 2.1.0
625810ec
JB
11Release: 1
12License: BSD
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/tpm2-pytss/
15Source0: https://files.pythonhosted.org/packages/source/t/tpm2-pytss/tpm2-pytss-%{version}.tar.gz
f8d84ea1 16# Source0-md5: a629a192cd5a42b8d1e7ffab391de231
625810ec
JB
17URL: https://github.com/tpm2-software/tpm2-pytss
18BuildRequires: python3-asn1crypto
19BuildRequires: python3-cffi >= 1.0.0
20BuildRequires: python3-cryptography >= 3.0
21BuildRequires: python3-devel >= 1:3.7
22BuildRequires: python3-packaging
23BuildRequires: python3-pkgconfig
f8d84ea1 24BuildRequires: python3-pycparser
625810ec
JB
25BuildRequires: python3-setuptools >= 1:44
26BuildRequires: python3-setuptools_scm >= 3.4.3
27BuildRequires: python3-toml
28%if %{with tests}
29# or swtpm
30BuildRequires: ibmswtpm2
31BuildRequires: python3-PyYAML
32BuildRequires: python3-pytest
33%endif
34BuildRequires: rpm-build >= 4.6
35BuildRequires: rpm-pythonprov
36BuildRequires: rpmbuild(macros) >= 1.714
37BuildRequires: sed >= 4.0
f8d84ea1
JB
38# 3.3/4.0 when available in PLD
39BuildRequires: tpm2-tss-devel >= 2.4
625810ec
JB
40%if %{with doc}
41BuildRequires: python3-myst_parser
42BuildRequires: python3-sphinx_rtd_theme
43BuildRequires: sphinx-pdg-3
44%endif
45Requires: python3-modules >= 1:3.7
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
49TPM2 TSS Python bindings for Enhanced System API (ESYS), Feature API
50(FAPI), Marshaling (MU), TCTI Loader (TCTILdr) and RC Decoding
51(rcdecode) libraries. It also contains utility methods for wrapping
52keys to TPM 2.0 data structures for importation into the TPM,
53unwrapping keys and exporting them from the TPM, TPM-less
54makecredential command and name calculations, TSS2 PEM Key format
55support, importing Keys from PEM, DER and SSH formats, conversion from
56tpm2-tools based command line strings and loading tpm2-tools context
57files.
58
59%description -l pl.UTF-8
60Wiązania Pythona TPM2 TSS do bibliotek Enhanced System API (ESYS),
61Feature API (FAPI), Marshaling (MU), TCTI Loader (TCTILdr) oraz RC
62Decoding (rcdecode). Zawiera także metody narzędziowe do opakowywania
63kluczy w struktury danych TPM 2.0 w celu importu do TPM,
64rozpakowywania kluczy i eksportowania ich z TPM, obliczeń poleceń i
65nazw makecredential bez użycia TPM, obsługi formatu kluczy TSS2 PEM,
66importu kluczy z formatów PEM, DER i SSH, konwersji z linii poleceń
67tpm2-tools oraz ładowania plików kontekstu tpm2-tools.
68
69%package apidocs
70Summary: API documentation for Python tpm2-pytss module
71Summary(pl.UTF-8): Dokumentacja API modułu Pythona tpm2-pytss
72Group: Documentation
73BuildArch: noarch
74
75%description apidocs
76API documentation for Python tpm2-pytss module.
77
78%description apidocs -l pl.UTF-8
79Dokumentacja API modułu Pythona tpm2-pytss.
80
81%prep
82%setup -q -n tpm2-pytss-%{version}
83
f8d84ea1 84# broken and not used (as of 2.1.0)
625810ec
JB
85%{__sed} -i -e '/^\(version\|release\) = /d' docs/conf.py
86
87%build
88%py3_build
89
90%if %{with tests}
91# test_fapi fail for me (as of 1.2.0) with ibmswtpms2
92PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
93PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
94%{__python3} -m pytest test -k 'not test_fapi'
95%endif
96
97%if %{with doc}
98PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
99sphinx-build-3 -b html docs docs/_build/html
100%endif
101
102%install
103rm -rf $RPM_BUILD_ROOT
104
105%py3_install
106
107%clean
108rm -rf $RPM_BUILD_ROOT
109
110%files
111%defattr(644,root,root,755)
112%doc CHANGELOG.md LICENSE README.md
113%dir %{py3_sitedir}/tpm2_pytss
114%{py3_sitedir}/tpm2_pytss/*.py
115%attr(755,root,root) %{py3_sitedir}/tpm2_pytss/_libtpm2_pytss.abi3.so
116%{py3_sitedir}/tpm2_pytss/__pycache__
117%{py3_sitedir}/tpm2_pytss/internal
118%{py3_sitedir}/tpm2_pytss-%{version}-py*.egg-info
119
120%if %{with doc}
121%files apidocs
122%defattr(644,root,root,755)
123%doc docs/_build/html/{_modules,_static,*.html,*.js}
124%endif
This page took 0.145053 seconds and 4 git commands to generate.