Blob Blame History Raw
%global _description %{expand:
inspyred is a free, open source framework for creating biologically-inspired
computational intelligence algorithms in Python, including evolutionary
computation, swarm intelligence, and immunocomputing. Additionally, inspyred
provides easy-to-use canonical versions of many bio-inspired algorithms for
users who do not need much customization.}

%global forgeurl
%global commit 5fa8224f0c81c74e3c6183457f760af854ad72fb

Name:           python-inspyred
Version:        1.0.1

Release:        %{autorelease}
Summary:        Library for bio-inspired computational intelligence

License:        MIT
URL:            %{forgeurl}
Source0:        %{forgesource}
# Update for the new python packaging system
Patch0:         0001-feat-list-all-packages.patch

BuildArch:      noarch

%description %_description

%package -n python3-inspyred
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  git-core

%description -n python3-inspyred %_description

%forgeautosetup -S git

# Remove undeeded BRs
sed -i -e '/pip/ d' -e '/bumpversion/ d' -e '/watchdog/ d' -e '/flake8/ d' -e '/coverage/ d' -e '/tox/ e' -e '/Sphinx/ d' requirements_dev.txt
# Add missing BR
echo "matplotlib" >> requirements_dev.txt

# pp is not packaged (nor maintained), so skip its test
# upstream has been informed:
sed -i -e '/test_parallel_evaluation_pp/i \    @unittest.skip("pp unavailable")' tests/

# May fail simply because of randomisation, so we skip it
sed -i -e '/test_multiprocessing_migration/i \    @unittest.skip("unreliable")' tests/

%pyproject_buildrequires -r requirements_dev.txt


%pyproject_save_files inspyred

# Doesnt run all tests
# Run them all
export PYTHONPATH=%{buildroot}%{python3_sitelib}:%{buildroot}%{python3_sitearch}
%{python3} test

%files -n python3-inspyred -f %{pyproject_files}
%doc examples