python-parver/python-parver.spec

63 lines
1.7 KiB
RPMSpec
Raw Normal View History

%global _empty_manifest_terminate_build 0
%global pypi_name parver
Name: python-%{pypi_name}
Version: 0.4
Release: 1
Summary: Parse and manipulate version numbers.
License: MIT
URL: https://github.com/RazerM/parver
Source0: https://files.pythonhosted.org/packages/ce/a5/0a2f93e7bb5ab3c35b37c991885264864c5803f4da830cf519c663991d78/parver-0.4.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-hatchling
BuildRequires: python3-hypothesis
#for test
BuildRequires: python3-pytest
BuildRequires: python3-pretend
BuildRequires: python3-Arpeggio
%description
Parver allows parsing and manipulation of PEP 440 version numbers.
%package -n python3-%{pypi_name}
Summary: %{summary}
%description -n python3-%{pypi_name}
Parver allows parsing and manipulation of PEP 440 version numbers.
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%build
%pyproject_build
%install
%pyproject_install
%check
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \
PATH="%{buildroot}%{_bindir}:$PATH" \
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \
PYTHONDONTWRITEBYTECODE=1 \
%{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"} \
PYTEST_XDIST_AUTO_NUM_WORKERS=%{_smp_build_ncpus} \
%{_bindir}/pytest -v
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}*.dist-info/
%changelog
* Sat Jun 24 2023 Dongxing Wang <dxwangk@isoftstone.com> - 0.4-1
- Initial package