7ccea72
%global _description %{expand: \
7ccea72
duecredit is being conceived to address the problem of inadequate citation of
7ccea72
scientific software and methods, and limited visibility of donation requests
7ccea72
for open-source software.
7ccea72
7ccea72
It provides a simple framework (at the moment for Python only) to embed
7ccea72
publication or other references in the original code so they are automatically
7ccea72
collected and reported to the user at the necessary level of reference detail,
7ccea72
i.e. only references for actually used functionality will be presented back if
7ccea72
software provides multiple citeable implementations.}
7ccea72
4ad7bee
Name:           python-duecredit
bef7e2c
Version:        0.9.3
9de6381
Release:        %autorelease
7ccea72
Summary:        Automated collection and reporting of citations
7ccea72
c8aaf0c
License:        BSD-2-Clause-Views
4ad7bee
URL:            https://github.com/duecredit/duecredit
4ad7bee
Source0:        %{pypi_source duecredit}
7ccea72
7ccea72
BuildArch:      noarch
7ccea72
c14081d
%description
c14081d
%{_description}
c14081d
4ad7bee
%package -n python3-duecredit
c14081d
Summary:        %{summary}
8800c44
c14081d
BuildRequires:  python3-devel
c14081d
BuildRequires:  %{py3_dist pytest}
fee2898
BuildRequires:  help2man
7ccea72
7ccea72
4ad7bee
%description -n python3-duecredit
7ccea72
%{_description}
7ccea72
7ccea72
%package doc
7ccea72
Summary:        Documentation for %{name}
7ccea72
7ccea72
%description doc
7ccea72
Documentation for %{name}.
7ccea72
7ccea72
%prep
4ad7bee
%autosetup -n duecredit-%{version}
4ad7bee
4ad7bee
%generate_buildrequires
4ad7bee
%pyproject_buildrequires
7ccea72
7ccea72
%build
4ad7bee
%pyproject_wheel
7ccea72
7ccea72
%install
4ad7bee
%pyproject_install
a6b8db2
%pyproject_save_files -l duecredit
7ccea72
fee2898
# Create man pages from --help and --version
fee2898
mkdir man
fee2898
%{py3_test_envvars} help2man --section 1 --no-discard-stderr \
fee2898
--no-info --output man/duecredit.1 duecredit
fee2898
mkdir -p %{buildroot}%{_mandir}/man1
fee2898
install -m 0644 man/duecredit.1 %{buildroot}%{_mandir}/man1
fee2898
7ccea72
%check
8800c44
PYTHONPATH=%{buildroot}/%{python3_sitelib} %{pytest} duecredit/tests --ignore=duecredit/tests/test_io.py
7ccea72
4ad7bee
%files -n python3-duecredit -f %{pyproject_files}
4ad7bee
%{_bindir}/duecredit
fee2898
%{_mandir}/man1/duecredit.1*
7ccea72
7ccea72
%files doc
7ccea72
%license LICENSE
7ccea72
%doc examples/
7ccea72
7ccea72
%changelog
9de6381
%autochangelog