File python-hatch-requirements-txt.spec of Package python-hatch-requirements-txt
#
# spec file for package python-hatch-requirements-txt
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-hatch-requirements-txt
Version: 0.4.0
Release: 0
Summary: Hatchling plugin to read project dependencies from requirements.txt file
License: MIT
URL: https://github.com/repo-helper/hatch-requirements-txt
Source: https://github.com/repo-helper/hatch-requirements-txt/archive/refs/tags/v%{version}.tar.gz#/hatch-requirements-txt-%{version}.tar.gz
# Pull request 47: tests: handle hatchling dependency spec formatting changes
Patch0: https://patch-diff.githubusercontent.com/raw/repo-helper/hatch-requirements-txt/pull/47.patch#/pull-request-47.patch
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: python-rpm-macros
# test requirements
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytest-randomly >= 3.7.0}
BuildRequires: %{python_module pytest-timeout >= 1.4.2}
BuildRequires: %{python_module coincidence >= 0.2.0}
BuildRequires: %{python_module domdf-python-tools >= 3.3.0}
BuildRequires: %{python_module importlib_metadata >= 3.6.0}
BuildRequires: %{python_module pkginfo >= 1.8.3}
#
BuildRequires: fdupes
BuildArch: noarch
%python_subpackages
%description
Hatchling plugin to read project dependencies from requirements.txt file.
%prep
%autosetup -p1 -n hatch-requirements-txt-%{version}
# remove shebangs
find . -type f -name "*.py" -exec sed -i '/#!\/usr\/bin\/env/d' {} +
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%{python_sitelib}/hatch_requirements_txt
%{python_sitelib}/hatch_requirements_txt-%{version}.dist-info
%changelog