-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.3.1: pytest is failing in one unit #9
Comments
My guess is that default.toml is missing from your build (and install). Can you confirm in the environment with:
It should emit "True". If it's false, it confirms my suspicion and you should ensure than a MANIFEST or manifest template exists to include that file in the build. |
This content of the generated rpm package # rpm -ql python-pytest-enabler
/usr/lib/python3.8/site-packages/pytest_enabler
/usr/lib/python3.8/site-packages/pytest_enabler-2.3.1.dist-info
/usr/lib/python3.8/site-packages/pytest_enabler-2.3.1.dist-info/LICENSE
/usr/lib/python3.8/site-packages/pytest_enabler-2.3.1.dist-info/METADATA
/usr/lib/python3.8/site-packages/pytest_enabler-2.3.1.dist-info/RECORD
/usr/lib/python3.8/site-packages/pytest_enabler-2.3.1.dist-info/WHEEL
/usr/lib/python3.8/site-packages/pytest_enabler-2.3.1.dist-info/entry_points.txt
/usr/lib/python3.8/site-packages/pytest_enabler-2.3.1.dist-info/top_level.txt
/usr/lib/python3.8/site-packages/pytest_enabler/__init__.py
/usr/lib/python3.8/site-packages/pytest_enabler/__pycache__
/usr/lib/python3.8/site-packages/pytest_enabler/__pycache__/__init__.cpython-38.opt-1.pyc
/usr/lib/python3.8/site-packages/pytest_enabler/__pycache__/__init__.cpython-38.pyc
/usr/share/man/man3/python-pytest-enabler.3.gz and indeed there is no Here is pep517 based build output: + SETUPTOOLS_SCM_PRETEND_VERSION=2.3.1
+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
running egg_info
creating pytest_enabler.egg-info
writing pytest_enabler.egg-info/PKG-INFO
writing dependency_links to pytest_enabler.egg-info/dependency_links.txt
writing entry points to pytest_enabler.egg-info/entry_points.txt
writing requirements to pytest_enabler.egg-info/requires.txt
writing top-level names to pytest_enabler.egg-info/top_level.txt
writing manifest file 'pytest_enabler.egg-info/SOURCES.txt'
reading manifest file 'pytest_enabler.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'pytest_enabler.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/pytest_enabler
copying pytest_enabler/__init__.py -> build/lib/pytest_enabler
running egg_info
writing pytest_enabler.egg-info/PKG-INFO
writing dependency_links to pytest_enabler.egg-info/dependency_links.txt
writing entry points to pytest_enabler.egg-info/entry_points.txt
writing requirements to pytest_enabler.egg-info/requires.txt
writing top-level names to pytest_enabler.egg-info/top_level.txt
reading manifest file 'pytest_enabler.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'pytest_enabler.egg-info/SOURCES.txt'
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/pytest_enabler
copying build/lib/pytest_enabler/__init__.py -> build/bdist.linux-x86_64/wheel/pytest_enabler
running install_egg_info
Copying pytest_enabler.egg-info to build/bdist.linux-x86_64/wheel/pytest_enabler-2.3.1-py3.8.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/pytest_enabler-2.3.1.dist-info/WHEEL
creating '/home/tkloczko/rpmbuild/BUILD/pytest-enabler-2.3.1/dist/.tmp-nweq5r3n/pytest_enabler-2.3.1-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'pytest_enabler/__init__.py'
adding 'pytest_enabler-2.3.1.dist-info/LICENSE'
adding 'pytest_enabler-2.3.1.dist-info/METADATA'
adding 'pytest_enabler-2.3.1.dist-info/WHEEL'
adding 'pytest_enabler-2.3.1.dist-info/entry_points.txt'
adding 'pytest_enabler-2.3.1.dist-info/top_level.txt'
adding 'pytest_enabler-2.3.1.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built pytest_enabler-2.3.1-py3-none-any.whl As you see |
Looks like as pep517 backend is used |
No .. wrong. It is used |
.. or details that |
Right - skeleton-based projects require I suspect the solution is similar to that of jaraco.text, which also has package data present and relies on SCM metadata to ensure |
OK so what now? 🤔 |
I found by adding a MANIFEST.in causes all files that were in the tarball to be included:
Maybe that's a suitable workaround? |
I presume adding the manifest works around the issue. Feel free to comment if further investigation is needed or if there's something specific this project can do to help. |
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
Here is list of installed modules in build env
The text was updated successfully, but these errors were encountered: