diff --git a/HeapDict-1.0.1.tar.gz b/HeapDict-1.0.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..655ff678ac1fedf9dfa04c9049f35bcbaaacea6c Binary files /dev/null and b/HeapDict-1.0.1.tar.gz differ diff --git a/python-heapdict.spec b/python-heapdict.spec new file mode 100644 index 0000000000000000000000000000000000000000..ee3c525385b25b9cad603aeaddd48ad06e945734 --- /dev/null +++ b/python-heapdict.spec @@ -0,0 +1,60 @@ +%global srcname heapdict +%global pkgname HeapDict + +Name: python-%{srcname} +Version: 1.0.1 +Release: 1%{?dist} +Summary: A heap with decrease-key and increase-key operations + +License: BSD +URL: https://pypi.python.org/pypi/%{srcname} +Source0: %pypi_source %{pkgname} + +BuildArch: noarch + +%global _description \ +HeapDict is designed to be used as a priority queue, where items are added and \ +consumed by priority. Compared to an ordinary dict, a heapdict has the \ +following differences: popitem and peekitem returns the (key, priority) pair \ +with the lowest priority, instead of a random object. + +%description %{_description} + +%package -n python3-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{srcname}} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-test + +%description -n python3-%{srcname} %{_description} + + +%prep +%autosetup -n %{pkgname}-%{version} + + +%build +%py3_build + + +%install +%py3_install + + +%check +%{__python3} test_heap.py + + +%files -n python3-%{srcname} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{srcname}.py +%{python3_sitelib}/%{pkgname}-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/__pycache__/%{srcname}*.py? + + +%changelog +* Mon Jun 28 2021 CaiYuxin - 1.0.1-1 +- init project \ No newline at end of file