Add test for +auto argument to include .pth files in other files

This commit is contained in:
Tomas Hrnciar 2020-08-04 12:09:15 +02:00
parent 0db4e67f03
commit d0d4060cec
4 changed files with 96 additions and 2 deletions

View File

@ -215,7 +215,6 @@ def classify_paths(
paths, name, "script", *pycached(path, python_version)
)
else:
warnings.warn(f"Unrecognized file: {path}")
paths["other"]["files"].append(path)
else:
# this file is inside a dir, we classify that dir

View File

@ -142,6 +142,29 @@ classified:
- /usr/share/jupyter/kernels/python3/logo-64x64.png
- /usr/share/jupyter/kernels/python3/logo-32x32.png
- /usr/share/jupyter/kernels/python3/kernel.json
zope:
metadata:
dirs:
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info
docs: []
files:
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/RECORD
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/top_level.txt
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/WHEEL
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/METADATA
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/DESCRIPTION.rst
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/INSTALLER
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/metadata.json
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/namespace_packages.txt
licenses: []
modules:
zope:
- files:
- /usr/lib/python3.7/site-packages/zope
type: package
other:
files:
- /usr/lib/python3.7/site-packages/zope.event-4.4-py3.7-nspkg.pth
dumped:
- - tensorflow
@ -220,6 +243,19 @@ dumped:
- /usr/share/jupyter/kernels/python3/kernel.json
- /usr/share/jupyter/kernels/python3/logo-32x32.png
- /usr/share/jupyter/kernels/python3/logo-64x64.png
- - zope
- zope
- - '%dir /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info'
- /usr/lib/python3.7/site-packages/zope.event-4.4-py3.7-nspkg.pth
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/DESCRIPTION.rst
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/INSTALLER
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/METADATA
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/RECORD
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/WHEEL
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/metadata.json
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/namespace_packages.txt
- /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/top_level.txt
- /usr/lib/python3.7/site-packages/zope/
records:
kerberos:
@ -482,3 +518,22 @@ records:
ipykernel/trio_runner.py,sha256=wmKGMoYCfScMli-cIHPpS581gPvQrSujC16pIwCqykw,2064
ipykernel/zmqshell.py,sha256=_UVOK1Ulm3YTlMRNoNX22oDao31JhyP73tYL_pESnuU,23314
ipykernel_launcher.py,sha256=s-PCLKRVtvwG-33p9FSUHvClwBhGh03sSabNznEmfMA,451
zope:
path: /usr/lib/python3.7/site-packages/zope.event-4.4.dist-info/RECORD
content: |
zope.event-4.4-py3.7-nspkg.pth,sha256=SWEVH-jEWsKYrL0qoC6GBJaStx_iKxGoAY9PQycFVC4,529
zope.event-4.4.dist-info/DESCRIPTION.rst,sha256=CX2EVKqG2pzw-faFr2_KGRuKmh9ZHuGbMaXjAZc0Zuw,2714
zope.event-4.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
zope.event-4.4.dist-info/METADATA,sha256=4v_8UFIp8sJkKZy1o72XMJkV4ZKwz8_NgMGXmiOKQ5Q,4135
zope.event-4.4.dist-info/RECORD,,
zope.event-4.4.dist-info/WHEEL,sha256=o2k-Qa-RMNIJmUdIc7KU6VWR_ErNRbWNlxDIpl7lm34,110
zope.event-4.4.dist-info/metadata.json,sha256=v3W0O2Dqqg20UMy2YprUVg3i3wf88J4qClxwIlePve4,1464
zope.event-4.4.dist-info/namespace_packages.txt,sha256=QpUHvpO4wIuZDeEgKY8qZCtD-tAukB0fn_f6utzlb98,5
zope.event-4.4.dist-info/top_level.txt,sha256=QpUHvpO4wIuZDeEgKY8qZCtD-tAukB0fn_f6utzlb98,5
zope/event/__init__.py,sha256=-GW-8PML_6_LsjCDvLzFVkL4sTYRtlLr_ZKtPbs-Rw4,1141
zope/event/__pycache__/__init__.cpython-38.pyc,,
zope/event/__pycache__/classhandler.cpython-38.pyc,,
zope/event/__pycache__/tests.cpython-38.pyc,,
zope/event/classhandler.py,sha256=CEx6issKWSia0Wruob_jIQI2EfYX45krokoTHyVsJFQ,1816
zope/event/tests.py,sha256=bvEzvOmPoQETMqYiqsR9EeVsC8Dzy-HOclfpQFVjDhE,1871

View File

@ -156,7 +156,7 @@ def test_parse_record_tensorflow():
def remove_others(expected):
return [p for p in expected if not (p.startswith(str(BINDIR)) or p.startswith(str("/usr/share")))]
return [p for p in expected if not (p.startswith(str(BINDIR)) or p.startswith("/usr/share") or p.endswith(".pth"))]
@pytest.mark.parametrize("include_auto", (True, False))

View File

@ -0,0 +1,40 @@
Name: python-zope-event
Version: 4.2.0
Release: 0%{?dist}
Summary: Zope Event Publication
License: ZPLv2.1
URL: https://pypi.python.org/pypi/zope.event/
Source0: %{pypi_source zope.event}
BuildArch: noarch
BuildRequires: pyproject-rpm-macros
BuildRequires: python3-devel
%description
This package contains .pth files.
Building this tests that .pth files are not listed when +auto is not used
with %%pyproject_save_files.
%package -n python3-zope-event
Summary: %{summary}
%description -n python3-zope-event
...
%prep
%setup -q -n zope.event-%{version}
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files zope +auto
%files -n python3-zope-event -f %{pyproject_files}
%doc README.rst
%license LICENSE.txt