summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 19:52:23 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 19:52:23 +0000
commita98bc098d3c2f75c1a9bbb6819733287673f9578 (patch)
treee882a3a46730b1e4899d0468375f93aad40af90d
parentfcef6c6285e87252bd8fc37dddd257c070d105e7 (diff)
automatic import of python-binpacking
-rw-r--r--.gitignore1
-rw-r--r--python-binpacking.spec90
-rw-r--r--sources1
3 files changed, 92 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..4381e9e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/binpacking-1.5.2.tar.gz
diff --git a/python-binpacking.spec b/python-binpacking.spec
new file mode 100644
index 0000000..f1bca19
--- /dev/null
+++ b/python-binpacking.spec
@@ -0,0 +1,90 @@
+%global _empty_manifest_terminate_build 0
+Name: python-binpacking
+Version: 1.5.2
+Release: 1
+Summary: Heuristic distribution of weighted items to bins (either a fixed number of bins or a fixed number of volume per bin). Data may be in form of list, dictionary, list of tuples or csv-file.
+License: MIT
+URL: https://www.github.com/benmaier/binpacking
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c4/f8/ced0d568105ce48e0453da46e848509ebeb3db1261cdf2ed83ed6e607b82/binpacking-1.5.2.tar.gz
+BuildArch: noarch
+
+
+%description
+This package contains greedy algorithms to solve two typical bin packing
+problems, (i) sorting items into a constant number of bins, (ii) sorting
+items into a low number of bins of constant size. Here's a usage example
+ >>> import binpacking
+ >>>
+ >>> b = { 'a': 10, 'b': 10, 'c':11, 'd':1, 'e': 2,'f':7 }
+ >>> bins = binpacking.to_constant_bin_number(b,4) # 4 being the number of bins
+
+%package -n python3-binpacking
+Summary: Heuristic distribution of weighted items to bins (either a fixed number of bins or a fixed number of volume per bin). Data may be in form of list, dictionary, list of tuples or csv-file.
+Provides: python-binpacking
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-binpacking
+This package contains greedy algorithms to solve two typical bin packing
+problems, (i) sorting items into a constant number of bins, (ii) sorting
+items into a low number of bins of constant size. Here's a usage example
+ >>> import binpacking
+ >>>
+ >>> b = { 'a': 10, 'b': 10, 'c':11, 'd':1, 'e': 2,'f':7 }
+ >>> bins = binpacking.to_constant_bin_number(b,4) # 4 being the number of bins
+
+%package help
+Summary: Development documents and examples for binpacking
+Provides: python3-binpacking-doc
+%description help
+This package contains greedy algorithms to solve two typical bin packing
+problems, (i) sorting items into a constant number of bins, (ii) sorting
+items into a low number of bins of constant size. Here's a usage example
+ >>> import binpacking
+ >>>
+ >>> b = { 'a': 10, 'b': 10, 'c':11, 'd':1, 'e': 2,'f':7 }
+ >>> bins = binpacking.to_constant_bin_number(b,4) # 4 being the number of bins
+
+%prep
+%autosetup -n binpacking-1.5.2
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-binpacking -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.5.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..8e5818e
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+f1f1b976981b93fa9d7dd3a5a44622ea binpacking-1.5.2.tar.gz