-Source0: http://chardet.feedparser.org/download/%{module}-%{version}.tgz
-# Source0-md5: f8c510a6fac300fe0ac9a0c24a76a7ba
-URL: http://chardet.feedparser.org/
-BuildRequires: python >= 1:2.4
-BuildRequires: python-devel >= 1:2.4
+#Source0Download: https://pypi.org/simple/chardet/
+Source0: https://files.pythonhosted.org/packages/source/c/chardet/%{module}-%{version}.tar.gz
+# Source0-md5: 7dd1ba7f9c77e32351b0a0cfacf4055c
+URL: https://pypi.org/project/chardet/
+%if %{with python2}
+BuildRequires: python >= 1:2.6
+BuildRequires: python-devel >= 1:2.6
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-hypothesis
+BuildRequires: python-pytest
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3 >= 1:3.3
+BuildRequires: python3-devel >= 1:3.3
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-hypothesis
+BuildRequires: python3-pytest
+%endif
+%endif
+%if %{with doc}
+BuildRequires: sphinx-pdg
+%endif