From 4aec9255c99411cb07138353f1bdda61fe0b501d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 5 Sep 2022 16:24:39 +0100 Subject: gentoo auto-resync : 05:09:2022 - 16:24:39 --- dev-python/tpm2-pytss/Manifest | 5 +- ....1.0-src-move-package-under-src-directory.patch | 239 --------------------- dev-python/tpm2-pytss/tpm2-pytss-1.1.0.ebuild | 41 ---- dev-python/tpm2-pytss/tpm2-pytss-1.2.0.ebuild | 38 ++++ 4 files changed, 40 insertions(+), 283 deletions(-) delete mode 100644 dev-python/tpm2-pytss/files/tpm2-pytss-1.1.0-src-move-package-under-src-directory.patch delete mode 100644 dev-python/tpm2-pytss/tpm2-pytss-1.1.0.ebuild create mode 100644 dev-python/tpm2-pytss/tpm2-pytss-1.2.0.ebuild (limited to 'dev-python/tpm2-pytss') diff --git a/dev-python/tpm2-pytss/Manifest b/dev-python/tpm2-pytss/Manifest index 7d7dfcb6c198..2f7b900f6abf 100644 --- a/dev-python/tpm2-pytss/Manifest +++ b/dev-python/tpm2-pytss/Manifest @@ -1,4 +1,3 @@ -AUX tpm2-pytss-1.1.0-src-move-package-under-src-directory.patch 9788 BLAKE2B aa0d9ec46a92aaaa1a26ccd632ad6fae17386f31f36cd411110632507c09622f8e4fff390b787d8b33af4cbffc18b298e2829565408d14fa54deedab227688df SHA512 913170a4bafc4c059d4ea6c3d855ad2c1a10a70dfc780e493964913c26156a6f08be969b219061d8e93341279641d38aac71ddeaddaea7c341e09e30823dc4fb -DIST tpm2-pytss-1.1.0.tar.gz 162559 BLAKE2B 2c9b34c323b96b3a8ded82a04accac9647d7f0b1cf05d269ed4bdf225d785fd8454dee82f054a5085f9d49d0feabacc8c5b72a7ee8af7bc9da8473d5689501b5 SHA512 71da9e005a3f645c0528a96bb96bafde9c262c5778646a19841af6323edaf889ede7267317ea96b7d44c7901d7bea04ca15fd1b5c86d61d33e49b34f5d0e2e94 -EBUILD tpm2-pytss-1.1.0.ebuild 989 BLAKE2B 336eb07b9c14a7395a978619c12044e59d98e3fe6ec5d3cc0cad53d8b2c88fd8a3652510437d80bd747bf335b0bf33d83aabfc55f8a785f33744c7d333d22a1f SHA512 5ecf1883c8b19953445d5da4da4e971cae8caead8356e6b6a1251143dc8ca3cf6547f4785a703e2e80f0652032a9bd08bda1a8a8ef98311c09f38f349c77797c +DIST tpm2-pytss-1.2.0.tar.gz 178555 BLAKE2B 782f7d8194d2a9395213f39e5a17414ae2ab49f961b01c496fd54803a43f6846434a1d69a3993d16b6b51c2578f6f5e1a0d883be791cf6fb29ae23012b2090cf SHA512 688223d05a2ed5f3a5aeec47c77a02c10d40d4f23a97622e76acbf8f86b14ac2a92482869c5e04de395edb96b1e1b142c5ff53c7dbc97673ead531e4d6138184 +EBUILD tpm2-pytss-1.2.0.ebuild 942 BLAKE2B 4334a2f783ad0aa2c727466a96b6bc38214422558e9398bc09de139a6dfb82e3c85901a6ecefabf763617d5419ded4562cd06b12d994d4afffd26e534b4fcc36 SHA512 06a3187a9b42e6d6909cce0999175389b150d5ea794127a00c18f261509f80549321057854cb20b2d9cb6ee6c9cfebb45b46ea919f596e2ecb21e7782f18cb4e MISC metadata.xml 511 BLAKE2B b59b0da52736f7042c9357f3422cd0d3181d0dbea315b4ebdedf038c6e7c367a402a9ef4deac20940c6126977d756f6557fa5a8b2f8f4bc95b40a7510e8ea19c SHA512 6d7659472f076746cd4edae6a5413f4e34b4996ae0ac3af345ed720aabfeb991895b8dbc3f24160017bbf2633c77d8721507c14604c4cce9a8d407bf699ce635 diff --git a/dev-python/tpm2-pytss/files/tpm2-pytss-1.1.0-src-move-package-under-src-directory.patch b/dev-python/tpm2-pytss/files/tpm2-pytss-1.1.0-src-move-package-under-src-directory.patch deleted file mode 100644 index 6e6342cac5b6..000000000000 --- a/dev-python/tpm2-pytss/files/tpm2-pytss-1.1.0-src-move-package-under-src-directory.patch +++ /dev/null @@ -1,239 +0,0 @@ -From a03b66dd73a2ff58ebf847864102585aa3d11af7 Mon Sep 17 00:00:00 2001 -From: William Roberts -Date: Wed, 11 May 2022 17:07:53 -0500 -Subject: [PATCH] src: move package under src directory - -Issue #341 reports that building a wheel and running the tests fails. I -was able to reproduce this behavior with the following commands: - -python3 -Bm build -w --no-isolation -python3 -m installer --destdir=installation dist/*.whl -export PYTHONPATH="/home/wcrobert/tmp/installation/usr/lib/python3.8/site-packages" -pytest test/test_types.py - -Note: - - Current Working Directory is the repo clone, so tpm2-pytss - - The export command may need to be updated for your specific version - of python. - -It fails with: -ImportError while importing test module '/home/wcrobert/workspace/tpm2-pytss/test/test_types.py'. - -E ModuleNotFoundError: No module named 'tpm2_pytss._libtpm2_pytss' - -However, this issue is a red herring. This really has to do with the -fact that the relative import in the test code tries to resolve to -non-built package in that directory rather then the built one on -PYTHONPATH. - -Proposed solutions to use full package names also don't work, becuase it -has to resolve to the built package and it will still attempt to resolve -the non-built package. The least finicky solution to fix this, was to -match what bcrypt was doing and move it under a src directory so it -forces the resolution to not occur on that directory and inplace (pip -install -e .) installations still work as well. - -Fixes: #341 - -Signed-off-by: William Roberts ---- - .gitignore | 4 ++-- - MANIFEST.in | 8 ++++---- - scripts/prepare_headers.py | 2 +- - setup.cfg | 6 ++++-- - setup.py | 8 +++++--- - {tpm2_pytss => src/tpm2_pytss}/ESAPI.py | 0 - {tpm2_pytss => src/tpm2_pytss}/FAPI.py | 0 - {tpm2_pytss => src/tpm2_pytss}/TCTI.py | 0 - {tpm2_pytss => src/tpm2_pytss}/TCTILdr.py | 0 - {tpm2_pytss => src/tpm2_pytss}/TSS2_Exception.py | 0 - {tpm2_pytss => src/tpm2_pytss}/__init__.py | 0 - {tpm2_pytss => src/tpm2_pytss}/callbacks.py | 0 - {tpm2_pytss => src/tpm2_pytss}/constants.py | 0 - {tpm2_pytss => src/tpm2_pytss}/encoding.py | 0 - {tpm2_pytss => src/tpm2_pytss}/fapi_info.py | 0 - src/tpm2_pytss/internal/__init__.py | 0 - {tpm2_pytss => src/tpm2_pytss}/internal/constants.py | 0 - {tpm2_pytss => src/tpm2_pytss}/internal/crypto.py | 0 - {tpm2_pytss => src/tpm2_pytss}/internal/templates.py | 0 - {tpm2_pytss => src/tpm2_pytss}/internal/utils.py | 0 - {tpm2_pytss => src/tpm2_pytss}/tsskey.py | 0 - {tpm2_pytss => src/tpm2_pytss}/types.py | 0 - {tpm2_pytss => src/tpm2_pytss}/utils.py | 0 - 23 files changed, 16 insertions(+), 12 deletions(-) - rename {tpm2_pytss => src/tpm2_pytss}/ESAPI.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/FAPI.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/TCTI.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/TCTILdr.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/TSS2_Exception.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/__init__.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/callbacks.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/constants.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/encoding.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/fapi_info.py (100%) - create mode 100644 src/tpm2_pytss/internal/__init__.py - rename {tpm2_pytss => src/tpm2_pytss}/internal/constants.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/internal/crypto.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/internal/templates.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/internal/utils.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/tsskey.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/types.py (100%) - rename {tpm2_pytss => src/tpm2_pytss}/utils.py (100%) - -diff --git a/.gitignore b/.gitignore -index 07e277e..396cfdb 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -40,5 +40,5 @@ public/ - *.rej - htmlcov - /.pytest_cache/ --tpm2_pytss/internal/type_mapping.py --tpm2_pytss/internal/versions.py -+src/tpm2_pytss/internal/type_mapping.py -+src/tpm2_pytss/internal/versions.py -diff --git a/MANIFEST.in b/MANIFEST.in -index 6bc43ab..7bbc96a 100644 ---- a/MANIFEST.in -+++ b/MANIFEST.in -@@ -1,8 +1,8 @@ - include README.md - include LICENSE --include tpm2_pytss/version --include tpm2_pytss/config.json --recursive-include tpm2_pytss/swig * -+include src/tpm2_pytss/version -+include src/tpm2_pytss/config.json -+recursive-include src/tpm2_pytss/swig * - recursive-include tests * - recursive-include examples * --exclude tpm2_pytss/internal/type_mapping.py -+exclude src/tpm2_pytss/internal/type_mapping.py -diff --git a/scripts/prepare_headers.py b/scripts/prepare_headers.py -index 0864a3d..7eb0a57 100644 ---- a/scripts/prepare_headers.py -+++ b/scripts/prepare_headers.py -@@ -11,7 +11,7 @@ import textwrap - - # import tpm2_pytss.constants - constants_spec = importlib.util.spec_from_file_location( -- "tpm2_pytss.internal.constants", "tpm2_pytss/internal/constants.py" -+ "tpm2_pytss.internal.constants", "src/tpm2_pytss/internal/constants.py" - ) - constants = importlib.util.module_from_spec(constants_spec) - constants_spec.loader.exec_module(constants) -diff --git a/setup.cfg b/setup.cfg -index 89a3c7a..5426a07 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -18,9 +18,11 @@ classifiers = - Programming Language :: Python :: 3.10 - - [options] --packages = -+package_dir= -+ =src -+packages= - tpm2_pytss -- tpm2_pytss/internal -+ tpm2_pytss.internal - setup_requires = - setuptools_scm[toml]>=3.4.3 - cffi>=1.0.0 -diff --git a/setup.py b/setup.py -index f10fe73..b7f1c96 100644 ---- a/setup.py -+++ b/setup.py -@@ -200,13 +200,15 @@ class type_generator(build_ext): - - p = os.path.join(self.build_lib, "tpm2_pytss/internal/type_mapping.py") - sp = os.path.join( -- os.path.dirname(__file__), "tpm2_pytss/internal/type_mapping.py" -+ os.path.dirname(__file__), "src/tpm2_pytss/internal/type_mapping.py" - ) - - vp = os.path.join(self.build_lib, "tpm2_pytss/internal/versions.py") -- svp = os.path.join(os.path.dirname(__file__), "tpm2_pytss/internal/versions.py") -+ svp = os.path.join( -+ os.path.dirname(__file__), "src/tpm2_pytss/internal/versions.py" -+ ) - -- print(f"generated _type_map with {len(type_map)} mappings") -+ print(f"generated _type_map with {len(type_map)} mappings in {p} and {sp}") - print(f"generated _element_type_map with {len(element_type_map)} mappings") - print(f"generated _versions with {len(versions)} versions") - -diff --git a/tpm2_pytss/ESAPI.py b/src/tpm2_pytss/ESAPI.py -similarity index 100% -rename from tpm2_pytss/ESAPI.py -rename to src/tpm2_pytss/ESAPI.py -diff --git a/tpm2_pytss/FAPI.py b/src/tpm2_pytss/FAPI.py -similarity index 100% -rename from tpm2_pytss/FAPI.py -rename to src/tpm2_pytss/FAPI.py -diff --git a/tpm2_pytss/TCTI.py b/src/tpm2_pytss/TCTI.py -similarity index 100% -rename from tpm2_pytss/TCTI.py -rename to src/tpm2_pytss/TCTI.py -diff --git a/tpm2_pytss/TCTILdr.py b/src/tpm2_pytss/TCTILdr.py -similarity index 100% -rename from tpm2_pytss/TCTILdr.py -rename to src/tpm2_pytss/TCTILdr.py -diff --git a/tpm2_pytss/TSS2_Exception.py b/src/tpm2_pytss/TSS2_Exception.py -similarity index 100% -rename from tpm2_pytss/TSS2_Exception.py -rename to src/tpm2_pytss/TSS2_Exception.py -diff --git a/tpm2_pytss/__init__.py b/src/tpm2_pytss/__init__.py -similarity index 100% -rename from tpm2_pytss/__init__.py -rename to src/tpm2_pytss/__init__.py -diff --git a/tpm2_pytss/callbacks.py b/src/tpm2_pytss/callbacks.py -similarity index 100% -rename from tpm2_pytss/callbacks.py -rename to src/tpm2_pytss/callbacks.py -diff --git a/tpm2_pytss/constants.py b/src/tpm2_pytss/constants.py -similarity index 100% -rename from tpm2_pytss/constants.py -rename to src/tpm2_pytss/constants.py -diff --git a/tpm2_pytss/encoding.py b/src/tpm2_pytss/encoding.py -similarity index 100% -rename from tpm2_pytss/encoding.py -rename to src/tpm2_pytss/encoding.py -diff --git a/tpm2_pytss/fapi_info.py b/src/tpm2_pytss/fapi_info.py -similarity index 100% -rename from tpm2_pytss/fapi_info.py -rename to src/tpm2_pytss/fapi_info.py -diff --git a/src/tpm2_pytss/internal/__init__.py b/src/tpm2_pytss/internal/__init__.py -new file mode 100644 -index 0000000..e69de29 -diff --git a/tpm2_pytss/internal/constants.py b/src/tpm2_pytss/internal/constants.py -similarity index 100% -rename from tpm2_pytss/internal/constants.py -rename to src/tpm2_pytss/internal/constants.py -diff --git a/tpm2_pytss/internal/crypto.py b/src/tpm2_pytss/internal/crypto.py -similarity index 100% -rename from tpm2_pytss/internal/crypto.py -rename to src/tpm2_pytss/internal/crypto.py -diff --git a/tpm2_pytss/internal/templates.py b/src/tpm2_pytss/internal/templates.py -similarity index 100% -rename from tpm2_pytss/internal/templates.py -rename to src/tpm2_pytss/internal/templates.py -diff --git a/tpm2_pytss/internal/utils.py b/src/tpm2_pytss/internal/utils.py -similarity index 100% -rename from tpm2_pytss/internal/utils.py -rename to src/tpm2_pytss/internal/utils.py -diff --git a/tpm2_pytss/tsskey.py b/src/tpm2_pytss/tsskey.py -similarity index 100% -rename from tpm2_pytss/tsskey.py -rename to src/tpm2_pytss/tsskey.py -diff --git a/tpm2_pytss/types.py b/src/tpm2_pytss/types.py -similarity index 100% -rename from tpm2_pytss/types.py -rename to src/tpm2_pytss/types.py -diff --git a/tpm2_pytss/utils.py b/src/tpm2_pytss/utils.py -similarity index 100% -rename from tpm2_pytss/utils.py -rename to src/tpm2_pytss/utils.py --- -2.35.1 - diff --git a/dev-python/tpm2-pytss/tpm2-pytss-1.1.0.ebuild b/dev-python/tpm2-pytss/tpm2-pytss-1.1.0.ebuild deleted file mode 100644 index d7f07c588526..000000000000 --- a/dev-python/tpm2-pytss/tpm2-pytss-1.1.0.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{8..10} ) -inherit distutils-r1 - -DESCRIPTION="Python bindings for TSS" -HOMEPAGE=" - https://pypi.org/project/tpm2-pytss - https://github.com/tpm2-software/tpm2-pytss -" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="BSD-2" -SLOT="0" -KEYWORDS="~amd64" - -IUSE="+fapi test" - -RDEPEND="app-crypt/tpm2-tss:=[fapi=] - fapi? ( >=app-crypt/tpm2-tss-3.0.3:= ) - dev-python/cffi[${PYTHON_USEDEP}] - dev-python/asn1crypto[${PYTHON_USEDEP}] - dev-python/cryptography[${PYTHON_USEDEP}] - dev-python/pycparser[${PYTHON_USEDEP}]" - -DEPEND="${RDEPEND} - test? ( app-crypt/swtpm )" - -BDEPEND="dev-python/setuptools_scm[${PYTHON_USEDEP}] - dev-python/pkgconfig[${PYTHON_USEDEP}]" - -PATCHES=( - "${FILESDIR}/${PN}-1.1.0-src-move-package-under-src-directory.patch" - ) - -export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} - -distutils_enable_tests pytest diff --git a/dev-python/tpm2-pytss/tpm2-pytss-1.2.0.ebuild b/dev-python/tpm2-pytss/tpm2-pytss-1.2.0.ebuild new file mode 100644 index 000000000000..b805c0e64531 --- /dev/null +++ b/dev-python/tpm2-pytss/tpm2-pytss-1.2.0.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..10} ) +inherit distutils-r1 + +DESCRIPTION="Python bindings for TSS" +HOMEPAGE=" + https://pypi.org/project/tpm2-pytss + https://github.com/tpm2-software/tpm2-pytss +" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="+fapi test" + +RDEPEND="app-crypt/tpm2-tss:=[fapi=] + fapi? ( >=app-crypt/tpm2-tss-3.0.3:= ) + dev-python/cffi[${PYTHON_USEDEP}] + dev-python/asn1crypto[${PYTHON_USEDEP}] + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/pycparser[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}]" + +DEPEND="${RDEPEND} + test? ( app-crypt/swtpm )" + +BDEPEND="dev-python/setuptools_scm[${PYTHON_USEDEP}] + dev-python/pkgconfig[${PYTHON_USEDEP}]" + +export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} + +distutils_enable_tests pytest -- cgit v1.2.3