Commit Graph

7 Commits

Author SHA1 Message Date
Miro Hrončok
cc5688e49d Include nested __pycache__ directories in %pyproject_save_files 2021-02-07 20:05:47 +01:00
Miro Hrončok
2660031756 CI tests: Use ! grep to assert something is missing
Previously, we have used `grep -v` to assert something is *not* there.
However, that doesn't work. See for example this file:

    $ cat TEST
    line1
    line2
    line3

    $ grep -v line4 TEST
    line1
    line2
    line3
    $ echo $?
    0

This gives a false sense of correctness, however it exits will 0 with anything:

    $ grep -v line3 TEST
    line1
    line2
    $ echo $?
    0

Instead, we use `! grep` now:

    $ ! grep line4 TEST
    $ echo $?
    0

    $ ! grep line3 TEST
    line3
    $ echo $?
    1

Additionally, remove a trailing slash from one of the checks to match both cases
(with or without the slash).
2020-10-26 17:18:51 +01:00
Miro Hrončok
e9281281f6 BR python3-devel from the test/example specs
This is the usage we want people to see.
One spec left with a comment instead.
2020-10-26 16:11:32 +01:00
Miro Hrončok
99d9596d7c Make sure to put * in '' in %pyproject_save_files
Otherwise, it may be expanded by Shell in random cases.
2020-08-06 20:19:40 +02:00
Petr Viktorin
9789724e07 Update python-ldap.spec to fix build failure
Use release 0 to not conflict with Fedora.
2020-06-23 11:04:38 +00:00
Miro Hrončok
95ba8376f5 Handle extracting debuginfo from extension modules
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1806625

Upstream issue for a proper fix https://github.com/pypa/pip/issues/7555

Co-Authored-By: Petr Viktorin <pviktori@redhat.com>
2020-04-16 15:45:48 +02:00
Patrik Kopkan
2800b49530 Add %pyproject_save_files macro
This macro save generates file section to %pyproject_files. It should
simplify %files section and allow to build by some automatic machinery

Supposed use case in Fedora:
    %install
    %pyproject_install
    %pyproject_save_files requests _requests

    %files -n python3-requests -f %{pyproject_files}
    %doc README.rst
    %license LICENSE

Automatic build of arbitrary packages (e.g. in Copr):
    %install
    %pyproject_install
    %pyproject_save_files * +bindir // save all modules with executables

    %files -n python3-requests -f %{pyproject_files}

Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
2020-04-15 16:45:10 +02:00