https://bugzilla.redhat.com/show_bug.cgi?id=2280062

Ben Beasley <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
           Doc Type|---                         |If docs needed, set a value



--- Comment #6 from Ben Beasley <[email protected]> ---
The output of pyp2rpm is unfortunately rather outdated. Among other issues, the
License is not SPDX, there are macros that obfuscate rather than simplifying,
and the spec file uses the “old” Python packaging guidelines
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_201x/ instead
of https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/.

May I suggest something like the following? I’m happy to discuss details and
provide documentation links.

Name:           python-exrex
Version:        0.11.0
Release:        %autorelease
Summary:        Irregular methods for regular expressions

License:        AGPL-3.0-or-later
URL:            https://github.com/asciimoo/exrex
# We package from the GitHub archive since the PyPI sdist lacks tests.
Source:         %{url}/archive/v%{version}/exrex-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  help2man

%global _description %{expand:
Exrex is a command line tool and python module that generates all – or random –
matching strings to a given regular expression and more.}

%description %{_description}


%package -n python3-exrex
Summary:        %{summary}

%description -n python3-exrex %{_description}


%prep
%autosetup -n exrex-%{version}


%generate_buildrequires
%pyproject_buildrequires -t


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files -l exrex

# Rely on the generated entry point %%{_bindir}/exrex; do not package
# %%{_bindir}/exrex.py, which is a copy of the entire library. If something
# needs to execute exrex.py, we can add a symbolic or hard link with than name
# for compatibility.
rm '%{buildroot}%{_bindir}/exrex.py'

# The site-packages module does not have executable permissions, so it should
# not have a shebang line.
sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/exrex.py'

# We need to do this in %%install rather than in %%build so we can use the
# %%{_bindir}/exrex entry point.
install -d '%{buildroot}%{_mandir}/man1'
PYTHONPATH='%{buildroot}%{python3_sitelib}' help2man \
    --no-info \
    --version-string='%{version}' \
    --output='%{buildroot}%{_mandir}/man1/exrex.1' \
    '%{buildroot}%{_bindir}/exrex'


%check
%tox


%files -n python3-exrex -f %{pyproject_files}
%doc README.md
%{_bindir}/exrex
%{_mandir}/man1/exrex.1*


%changelog
%autochangelog


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2280062

Report this comment as SPAM: 
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202280062%23c6
--
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to