From 616e0f0415ec65f82c6e6d17ba644d93dd75f4f5 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Nov 05 2018 19:58:37 +0000 Subject: Revert "No real support for python3" Unretiring for https://pagure.io/releng/issue/7904 This reverts commit 1f9244c410921958625afe845dad2803d50bd5a5. --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bfb1618 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/deap-a4dc752.tar.gz +/deap-232ed17.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index e9d5082..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -No real support for python3 diff --git a/python-deap-2to3.patch b/python-deap-2to3.patch new file mode 100644 index 0000000..ae6ed26 --- /dev/null +++ b/python-deap-2to3.patch @@ -0,0 +1,12 @@ +--- deap-232ed17142da1c8bb6a39179018f8278b122aada/setup.py 2017-01-07 20:06:31.770481938 -0800 ++++ deap-232ed17142da1c8bb6a39179018f8278b122aada/setup.py.new 2017-01-07 20:06:52.469575515 -0800 +@@ -87,7 +87,8 @@ + 'Topic :: Software Development', + ], + ext_modules = extra_modules, +- cmdclass = {'build_py': build_py, "build_ext" : ve_build_ext} ++ cmdclass = {'build_py': build_py, "build_ext" : ve_build_ext}, ++ use_2to3=True, + ) + + try: diff --git a/python-deap.spec b/python-deap.spec new file mode 100644 index 0000000..2977276 --- /dev/null +++ b/python-deap.spec @@ -0,0 +1,137 @@ +%global commit 232ed17142da1c8bb6a39179018f8278b122aada +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global date 20160624 + +Name: python-deap +Version: 1.0.1 +Release: 10.%{date}git%{shortcommit}%{?dist} +Summary: Distributed Evolutionary Algorithms in Python + +License: LGPLv3 +URL: https://www.github.com/deap +Source0: https://github.com/DEAP/deap/archive/%{commit}.tar.gz#/deap-%{shortcommit}.tar.gz + +# Tweak the usage of 2to3 in setup.py; this makes it work for the +# tests (so long as we're using setuptools, which we are; distutils +# doesn't understand this). Similar to +# https://github.com/DEAP/deap/pull/131 , but without pypy-specific +# bits we don't care about +Patch0: python-deap-2to3.patch + +BuildRequires: gcc +BuildRequires: gcc-c++ + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pypandoc +BuildRequires: python3-nose +BuildRequires: python3-numpy + +# documentation +BuildRequires: python3-sphinx +BuildRequires: texlive-scheme-basic +BuildRequires: texlive-ucs +BuildRequires: python3-numpy +BuildRequires: python3-matplotlib + +%global _description \ +DEAP is a novel evolutionary computation framework for rapid \ +prototyping and testing of ideas that implements a number of genetic \ +optimization algorithms behind a common interface. + +%description %_description + +%package -n python3-deap +Requires: python3-numpy +Summary: %{summary} +%{?python_provide:%python_provide python3-deap} + +%description -n python3-deap %_description + +%package -n python-deap-doc +Summary: Documentation for deap +BuildArch: noarch +%description -n python-deap-doc +%{summary}. + +%prep +%autosetup -n deap-%{commit} +sed -i 's/\["git", "rev-parse", "HEAD"\]/["echo", "deap-%{version}-%{release}"]/' \ + doc/conf.py + +# Work around for https://github.com/matplotlib/matplotlib/issues/7313 +sed -i -r 's/arange\(([-0-9.]+), ([-0-9.]+), [-0-9.]+\)/linspace(\1, \2, 20)/' doc/code/benchmarks/*.py + +%build +%py3_build + +# generate html docs +PYTHONPATH=build/lib.%{python3_platform}-%{python3_version} sphinx-build-3 doc build/html + +# remove the sphinx-build leftovers +rm -rf build/html/.{doctrees,buildinfo} + +%global _docdir_fmt %{name} + +%install +%py3_install + +%check +%{__python3} setup.py nosetests + +%files -n python3-deap +%license LICENSE.txt +%doc README.md +%{python3_sitearch}/deap +%{python3_sitearch}/deap-*.egg-info + +%files -n python-deap-doc +%license LICENSE.txt +%doc build/html + +%changelog +* Wed Oct 31 2018 Miro Hrončok - 1.0.1-10.20160624git232ed17 +- Subpackage python2-deap has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Fri Jul 13 2018 Fedora Release Engineering - 1.0.1-9.20160624git232ed17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.0.1-8.20160624git232ed17 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 1.0.1-7.20160624git232ed17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Jan 16 2018 Iryna Shcherbina - 1.0.1-6.20160624git232ed17 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Thu Aug 03 2017 Fedora Release Engineering - 1.0.1-5.20160624git232ed17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.0.1-4.20160624git232ed17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.0.1-3.20160624git232ed17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sat Jan 07 2017 Adam Williamson - 1.0.1-2.20160624git232ed17 +- Tweak setup.py so Python 3 tests will run on 2to3'ed code +- Add appropriate buildrequires and enable tests +- Remove some unneeded conditionals for EOL Fedora releases + +* Mon Dec 19 2016 Miro Hrončok +- Rebuild for Python 3.6 + +* Tue Oct 18 2016 Zbigniew Jędrzejewski-Szmek - 1.0.1-1.20160624git232ed17 +- Update to latest git snapshot +- The version was wrong (upstream never released anything after + 1.0.1). I forgot to actually create an update with the initial + version of this package. Luckily, this package was only built in + F22-24, and failed to build in rawhide, so it was never possible to + install it from repositories. I think this means it is possible to + lower the version without bumping the epoch. + +* Thu Apr 07 2016 Zbigniew Jędrzejewski-Szmek - 1.1.10-0.20160402gita4dc752 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..ef4310a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +2d0548dabd9546cab4440db97bfa09d8 deap-232ed17.tar.gz