%global pkgvers 0 %global scdate0 20241021 %global schash0 5ba4e88ba41f5679ad87603790af8f063a73c699 %global branch0 master %global source0 https://github.com/SimonBlanke/Gradient-Free-Optimizers.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: python-gradient_free_optimizers Version: 1.6.0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Gradient Free Optimizers License: BSD BuildArch: noarch URL: https://github.com/SimonBlanke/Gradient-Free-Optimizers BuildRequires: git python3-devel python3-setuptools python3-pip python3-wheel %description Simple and reliable optimization with local, global, population-based and sequential techniques in numerical discrete search spaces. %package -n python3-gradient-free-optimizers Summary: %{summary} Provides: python-gradient-free-optimizers %description -n python3-gradient-free-optimizers Simple and reliable optimization with local, global, population-based and sequential techniques in numerical discrete search spaces. %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller %if 0%{?rhel} >= 8 echo "import setuptools; setuptools.setup(packages=setuptools.find_packages('src'), package_dir={'':'src'}, name='%(n=%{name}; echo "${n#*-}")', version='%{version}')" > setup.py %else %generate_buildrequires %pyproject_buildrequires %endif %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %(n=%{name}; echo "${n#*-}") %files -n python3-gradient-free-optimizers -f %{pyproject_files} %license LICENSE %doc README.md %changelog * Fri Mar 29 2019 Balint Cristian - github upstream releases