From 5809bbc77ef84f37e0c86df414b75b7243801b44 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Tue, 4 Aug 2020 13:08:46 +0200 Subject: [PATCH] Replace +bindir with +auto in README and spec files --- README.md | 4 ++-- pyproject_save_files.py | 4 ++-- tests/python-isort.spec | 4 ++-- tests/python-pluggy.spec | 6 +++--- tests/python-pytest.spec | 2 +- tests/tldr.spec | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 31b5634..2e64d3e 100644 --- a/README.md +++ b/README.md @@ -157,11 +157,11 @@ You can use globs in the module names if listing them explicitly would be too te In fully automated environmets, you can use the `*` glob to include all modules. In Fedora however, you should always use a more specific glob to avoid accidentally packaging unwanted files (for example, a top level module named `test`). -Speaking about automated environments, it is possible to also list all executables in `/usr/bin` by adding a special `+bindir` argument. +Speaking about automated environments, some files cannot be classified with `%pyproject_save_files`, but it is possible to list all unclassified files by adding a special `+auto` argument. %install %pyproject_install - %pyproject_save_files * +bindir + %pyproject_save_files * +auto %files -n python3-requests -f %{pyproject_files} diff --git a/pyproject_save_files.py b/pyproject_save_files.py index cf1dd67..8125625 100755 --- a/pyproject_save_files.py +++ b/pyproject_save_files.py @@ -294,8 +294,8 @@ def parse_varargs(varargs): >>> sorted(mods) ['kerberos', 'requests*'] - >>> mods, bindir = parse_varargs(['tldr', 'tensorf*']) - >>> bindir + >>> mods, auto = parse_varargs(['tldr', 'tensorf*']) + >>> auto False >>> sorted(mods) ['tensorf*', 'tldr'] diff --git a/tests/python-isort.spec b/tests/python-isort.spec index 08e8cb8..cb1b582 100644 --- a/tests/python-isort.spec +++ b/tests/python-isort.spec @@ -13,7 +13,7 @@ BuildRequires: pyproject-rpm-macros %description This package contains executables. -Building this tests that executables are not listed when +bindir is not used +Building this tests that executables are not listed when +auto is not used with %%pyproject_save_files. %package -n python3-%{modname} @@ -45,7 +45,7 @@ Summary: %{summary} test -d %{buildroot}%{python3_sitelib}/%{modname}/ test -d %{buildroot}%{python3_sitelib}/%{modname}-%{version}.dist-info/ -# Internal check that executables are not present when +bindir was not used with %%pyproject_save_files +# Internal check that executables are not present when +auto was not used with %%pyproject_save_files grep -vF %{buildroot}%{_bindir}/%{modname} %{pyproject_files} diff --git a/tests/python-pluggy.spec b/tests/python-pluggy.spec index 8323fd5..b772e26 100644 --- a/tests/python-pluggy.spec +++ b/tests/python-pluggy.spec @@ -16,7 +16,7 @@ A pure Python library. The package contains tox.ini. Does not contain executable Building this tests: - generating runtime and testing dependencies - running tests with %%tox -- the %%pyproject_save_files +bindir option works without actual executables +- the %%pyproject_save_files +auto option works without actual executables - pyproject.toml with the setuptools backend and setuptools-scm @@ -41,8 +41,8 @@ Summary: %{summary} %install %pyproject_install -# There are no executables, but we are allowed to pass +bindir anyway -%pyproject_save_files pluggy +bindir +# There are no executables, but we are allowed to pass +auto anyway +%pyproject_save_files pluggy +auto %check diff --git a/tests/python-pytest.spec b/tests/python-pytest.spec index f7fc6c5..ca3c426 100644 --- a/tests/python-pytest.spec +++ b/tests/python-pytest.spec @@ -38,7 +38,7 @@ Summary: %{summary} %install %pyproject_install -%pyproject_save_files *pytest +bindir +%pyproject_save_files *pytest +auto %check # Only run one test (which uses a test-only dependency, hypothesis) diff --git a/tests/tldr.spec b/tests/tldr.spec index f7bd240..e9e824e 100644 --- a/tests/tldr.spec +++ b/tests/tldr.spec @@ -28,7 +28,7 @@ Building this tests: %install %pyproject_install -%pyproject_save_files tldr +bindir +%pyproject_save_files tldr +auto %check # Internal check for our macros: tests we don't ship __pycache__ in bindir