diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..18a7387 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/rpmautospec_core-0.1.0.tar.gz diff --git a/python-rpmautospec-core.spec b/python-rpmautospec-core.spec new file mode 100644 index 0000000..a3dea33 --- /dev/null +++ b/python-rpmautospec-core.spec @@ -0,0 +1,49 @@ +%global srcname rpmautospec_core +%global canonicalname %{py_dist_name %{srcname}} + +Name: python-%{canonicalname} +Version: 0.1.0 +Release: %autorelease +Summary: Minimum functionality for rpmautospec + +License: MIT +URL: https://github.com/fedora-infra/%{canonicalname} +Source0: %{pypi_source %{srcname}} +BuildArch: noarch +BuildRequires: python3-devel >= 3.6.0 +BuildRequires: sed + +%generate_buildrequires +%pyproject_buildrequires -t + +%global _description %{expand: +This package contains minimum functionality to determine if an RPM spec file +uses rpmautospec features.} + +%description %_description + +%package -n python3-%{canonicalname} +Summary: %{summary} + +%description -n python3-%{canonicalname} %_description + +%prep +%autosetup -n %{srcname}-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files %{srcname} +# Work around poetry not listing license files as such in package metadata. +sed -i -e 's|^\(.*/LICENSE\)|%%license \1|g' %{pyproject_files} + +%check +%tox + +%files -n python3-%{canonicalname} -f %{pyproject_files} +%doc README.md + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..e70047e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rpmautospec_core-0.1.0.tar.gz) = 47d71cf81d10ca08498abefd6362aa3e0be48aebfb1ad8978546b27ad1a103564463283a236f9df374e073773c61dd0b8a6ed2e60b6349e0a9fd57edf36b82cb